設定 L3 switch 的 IP 繞送
switch(config) # interface GigabitEthernet 0/1
switch(config-if) # no switchport **--重要--** 切換後才能設定 IP
switch(config-if) # ip address X.X.X.217 255.255.255.252
switch(config-if) # no sh
switch(config) # interface vlan1
switch(config-if) # ip address Y.Y.Y.30 255.255.255.224
switch(config-if) # no sh
switch(config) # interface range GigabitEthernet 0/2 - 24 --一次將 port 2~24 全部 no sh
switch(config-if) # no sh
switch(config) # ip route 0.0.0.0 0.0.0.0 X.X.X.218
switch(config) # ip route Y.Y.Y.0 255.255.255.224 Vlan1 --後面不能直接指定 VLAN 的 IP
switch(config) # ip routing **--重要--** 要打這行指令才會開啟 IP 繞送
switch # copy run sta
2012年11月20日 星期二
20121120 Juniper EX-2200
將工作上設定的一些指令貼上,設定一台 L3 switch
set system root-authentication encrypted-password "~!@#" --設定 root 密碼(自動加密)
set interfaces interface-range lan member-range ge-0/0/1 to ge-0/0/23 --將port1~23加入lan群組
set interfaces interface-range lan unit 0 family ethernet-switching vlan members lan --將 lan 群組加入名為 lan 的 VLAN 中
set interfaces ge-0/0/0 unit 0 family inet address X.X.X.165/30 --設定 port 0 的 IP
set interfaces vlan unit 16 family inet address Y.Y.Y.190/26 --設定 VLAN 16 的 IP
set routing-options static route 0.0.0.0/0 next-hop X.X.X.166 --預設的靜態路由
set routing-options static route Y.Y.Y.128/26 next-hop Y.Y.Y.190 --返回的路由設定
set vlans default l3-interface vlan.0 --開啟 VLAN 1 的 L3 繞送
set vlans lan vlan-id 16 --建立 VLAN 16
set vlans lan l3-interface vlan.16 --開啟 VLAN 16 的 L3 繞送
set system root-authentication encrypted-password "~!@#" --設定 root 密碼(自動加密)
set interfaces interface-range lan member-range ge-0/0/1 to ge-0/0/23 --將port1~23加入lan群組
set interfaces interface-range lan unit 0 family ethernet-switching vlan members lan --將 lan 群組加入名為 lan 的 VLAN 中
set interfaces ge-0/0/0 unit 0 family inet address X.X.X.165/30 --設定 port 0 的 IP
set interfaces vlan unit 16 family inet address Y.Y.Y.190/26 --設定 VLAN 16 的 IP
set routing-options static route 0.0.0.0/0 next-hop X.X.X.166 --預設的靜態路由
set routing-options static route Y.Y.Y.128/26 next-hop Y.Y.Y.190 --返回的路由設定
set vlans default l3-interface vlan.0 --開啟 VLAN 1 的 L3 繞送
set vlans lan vlan-id 16 --建立 VLAN 16
set vlans lan l3-interface vlan.16 --開啟 VLAN 16 的 L3 繞送
訂閱:
文章 (Atom)