Routed port 和 SVI 練習

如果公司被ISP分配到一個 111.241.149.0/24 的網段,你的工作就是拿一台L3 Switch過去讓 ISP 的Router和公司防火牆可以路由,這時候有兩種設法。 Routed port 設法: ip routing interface Ethernet0/0 no switchport ip address 111.241.149.254 255.255.255.0 interface Ethernet0/1 no switchport ip address 192.168.0.1 255.255.255.252 ip route 0.0.0.0 0.0.0.0 192.168.0.2 SVI 設法: ip routing interface Ethernet0/0 switchport access vlan 3 switchport mode access interface Ethernet0/1 switchport access vlan 2 switchport mode access interface Vlan2 ip address 192.168.0.1 255.255.255.252 interface Vlan3 ip address 111.241.149.254 255.255.255.0 ip route 0.0.0.0 0.0.0.0 192.168.0.2 (Vlan設定多少不重要,你爽就好,重點是可以區分上下port) 其實兩個設法都對,都可以達到公司的需求,也可以混合使用,比方說上面使用Routed port,下面使用SVI,只是第一種Routed port會失去L2的功能,就像Router上面的的Port一樣,但又不能切subinterface。 因此我們看到SVI的設法還是持續在發BPDU的封包,畢竟還是Switch port,但是Routed port就看不到BPDU的封包了。 但是如果有些伺服器想放在防火牆之上的話,就只能使用SVI的方法了,設定如下。 ip routing inter...