網絡拓撲圖練習
阿新 • • 發佈:2018-10-07
2.0 http ctrl+ -a mac 分享 c11 clu 4.3
拓撲圖
實現:
1.給每種服務器創建不同VLAN劃分
2.pc1和pc2可以互相訪問
3.pc3-pc11之間可以互相訪問
AR1
[Huawei]sysname router1 [router1]interface GigabitEthernet 0/0/0 [router1-GigabitEthernet0/0/0]ip address 192.168.1.254 24 Oct 7 2018 03:40:00-08:00 router1 %%01IFNET/4/LINK_STATE(l)[0]:The line protoco l IP on the interface GigabitEthernet0/0/0 has entered the UP state. [router1-GigabitEthernet0/0/0]q [router1]interface GigabitEthernet 0/0/1 [router1-GigabitEthernet0/0/1]ip address 192.168.12.1 24 Oct 7 2018 03:41:00-08:00 router1 %%01IFNET/4/LINK_STATE(l)[1]:The line protoco l IP on the interface GigabitEthernet0/0/1 has entered the UP state. [router1-GigabitEthernet0/0/1]q [router1]ospf [router1]ospf1 [router1-ospf-1]area [router1-ospf-1]area 0 [router1-ospf-1-area-0.0.0.0]netwo [router1-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255 [router1-ospf-1-area-0.0.0.0]q [router1-ospf-1]area 1 [router1-ospf-1-area-0.0.0.1]netwo [router1-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255 [router1-ospf-1-area-0.0.0.1]q [router1-ospf-1]q [router1]q <router1>save
AR2
[Huawei]sysname router2 [router2]interface g [router2]interface GigabitEthernet 0/0/0 [router2-GigabitEthernet0/0/0]ip add [router2-GigabitEthernet0/0/0]ip address 192.168.12.2 24 Oct 7 2018 03:43:12-08:00 router2 %%01IFNET/4/LINK_STATE(l)[0]:The line protoco l IP on the interface GigabitEthernet0/0/0 has entered the UP state. [router2-GigabitEthernet0/0/0]q [router2]interface g [router2]interface GigabitEthernet 0/0/1 [router2-GigabitEthernet0/0/1]ip add [router2-GigabitEthernet0/0/1]ip address 192.168.2.254 24 [router2-GigabitEthernet0/0/1] Oct 7 2018 03:43:36-08:00 router2 %%01IFNET/4/LINK_STATE(l)[1]:The line protoco l IP on the interface GigabitEthernet0/0/1 has entered the UP state. [router2-GigabitEthernet0/0/1]q [router2]ospf 1 [router2-ospf-1]area 1 [router2-ospf-1-area-0.0.0.1]network 192.168.12.0 0.0.0.255 [router2-ospf-1-area-0.0.0.1]q [router2-ospf-1]netwo [router2-ospf-1]area 0 [router2-ospf-1-area-0.0.0.0]q [router2-ospf-1]area [router2-ospf-1]area 1 [router2-ospf-1-area-0.0.0.1]undo network 192.168.12.0 0.0.0.255 [router2-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255 [router2-ospf-1-area-0.0.0.1]q [router2-ospf-1]area 0 [router2-ospf-1-area-0.0.0.0]netwo [router2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255 [router2-ospf-1-area-0.0.0.0] [router2-ospf-1-area-0.0.0.0]q [router2-ospf-1]q [router2]q <router2>save
HXJHJ
<Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname hxjhj [hxjhj]vlan batch 1 to 4 [hxjhj]interface Vlanif 1 [hxjhj-Vlanif1]ip address 192.168.154.1 24 [hxjhj-Vlanif1]q [hxjhj]interface Vlanif 2 [hxjhj-Vlanif2]ip address 192.168.3.254 24 [hxjhj-Vlanif2]q [hxjhj]interface Vlanif 3 [hxjhj-Vlanif3]ip address 192.168.4.254 24 [hxjhj-Vlanif3]q [hxjhj]interface Vlanif 4 [hxjhj-Vlanif4]ip address 192.168.5.254 24 [hxjhj-Vlanif4]q [hxjhj]interface GigabitEthernet 0/0/3 [hxjhj-GigabitEthernet0/0/3]port link-type access [hxjhj-GigabitEthernet0/0/3]port default vlan 2 [hxjhj-GigabitEthernet0/0/3]q [hxjhj]interface GigabitEthernet 0/0/4 [hxjhj-GigabitEthernet0/0/4]port link-type access [hxjhj-GigabitEthernet0/0/4]port default vlan 3 [hxjhj-GigabitEthernet0/0/4]q [hxjhj]interface GigabitEthernet 0/0/5 [hxjhj-GigabitEthernet0/0/5]port link-type access [hxjhj-GigabitEthernet0/0/5]port default vlan 4 [hxjhj-GigabitEthernet0/0/5]q [hxjhj]interface g [hxjhj]interface GigabitEthernet 0/0/1 [hxjhj-GigabitEthernet0/0/1]port link-type access [hxjhj-GigabitEthernet0/0/1]port default vlan 1 [hxjhj-GigabitEthernet0/0/1]q [hxjhj]interface GigabitEthernet 0/0/2 [hxjhj-GigabitEthernet0/0/2]port link-type access [hxjhj-GigabitEthernet0/0/2]port default vlan 1 [hxjhj-GigabitEthernet0/0/2]q [hxjhj]interface GigabitEthernet 0/0/6 [hxjhj-GigabitEthernet0/0/6]port link-type access [hxjhj-GigabitEthernet0/0/6]port default vlan 1 [hxjhj]ospf 1 [hxjhj-ospf-1]area 0 [hxjhj-ospf-1-area-0.0.0.0]network [hxjhj-ospf-1-area-0.0.0.0]network 192.168.254.0 0.0.0.255 [hxjhj-ospf-1-area-0.0.0.0]q [hxjhj-ospf-1]area 1 [hxjhj-ospf-1-area-0.0.0.1]network [hxjhj-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255 [hxjhj-ospf-1-area-0.0.0.1]q [hxjhj-ospf-1]area 2 [hxjhj-ospf-1-area-0.0.0.2]network [hxjhj-ospf-1-area-0.0.0.2]network 192.168.4.0 0.0.0.255 [hxjhj-ospf-1-area-0.0.0.2]q [hxjhj-ospf-1]area 3 [hxjhj-ospf-1-area-0.0.0.3]network 192.168.5.0 0.0.0.255 [hxjhj-ospf-1-area-0.0.0.3]q [hxjhj-ospf-1]
結果:
<hxjhj>dis cur # sysname hxjhj # vlan batch 2 to 4 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 ip address 192.168.254.1 255.255.255.0 # interface Vlanif2 ip address 192.168.3.254 255.255.255.0 # interface Vlanif3 ip address 192.168.4.254 255.255.255.0 # interface Vlanif4 ip address 192.168.5.254 255.255.255.0 # interface MEth0/0/1 # interface GigabitEthernet0/0/1 port link-type access # interface GigabitEthernet0/0/2 port link-type access # interface GigabitEthernet0/0/3 port link-type access port default vlan 2 # interface GigabitEthernet0/0/4 port link-type access port default vlan 3 # interface GigabitEthernet0/0/5 port link-type access port default vlan 4 # interface GigabitEthernet0/0/6 port link-type access # ... # ospf 1 area 0.0.0.0 network 192.168.254.0 0.0.0.255 area 0.0.0.1 network 192.168.3.0 0.0.0.255 area 0.0.0.2 network 192.168.4.0 0.0.0.255 area 0.0.0.3 network 192.168.5.0 0.0.0.255 # user-interface con 0 user-interface vty 0 4 # return
HJJHJ1
<Huawei>system-view [Huawei]sysname jrjhj1 [jrjhj1]vlan batch 1 to 7 [jrjhj1]interface Vlanif 1 [jrjhj1-Vlanif1]ip address 192.168.254.2 24 [jrjhj1-Vlanif1]q [jrjhj1]interface Vlanif 5 [jrjhj1-Vlanif5]ip address 192.168.6.254 24 [jrjhj1-Vlanif5]q [jrjhj1]interface Vlanif 6 [jrjhj1-Vlanif6]ip address 192.168.7.254 24 [jrjhj1-Vlanif6]q [jrjhj1]interface Vlanif 7 [jrjhj1-Vlanif7]ip address 192.168.8.254 24 [jrjhj1-Vlanif7]q [jrjhj1]interface GigabitEthernet 0/0/1 [jrjhj1-GigabitEthernet0/0/1]port link-type access [jrjhj1-GigabitEthernet0/0/1]port default vlan 1 [jrjhj1-GigabitEthernet0/0/1]q [jrjhj1]interface GigabitEthernet 0/0/2 [jrjhj1-GigabitEthernet0/0/2]port link-type access [jrjhj1-GigabitEthernet0/0/2]port default vlan 5 [jrjhj1-GigabitEthernet0/0/2]q [jrjhj1]interface GigabitEthernet 0/0/3 [jrjhj1-GigabitEthernet0/0/3]port link-type access [jrjhj1-GigabitEthernet0/0/3]port default vlan 6 [jrjhj1-GigabitEthernet0/0/3]q [jrjhj1]interface GigabitEthernet 0/0/4 [jrjhj1-GigabitEthernet0/0/4]port link-type access [jrjhj1-GigabitEthernet0/0/4]port default vlan 7 [jrjhj1-GigabitEthernet0/0/4]q [jrjhj1]ospf 1 [jrjhj1-ospf-1]area 0 [jrjhj1-ospf-1-area-0.0.0.0]network 192.168.254.0 0.0.0.255 [jrjhj1-ospf-1-area-0.0.0.0]q [jrjhj1-ospf-1] [jrjhj1-ospf-1]area 1 [jrjhj1-ospf-1-area-0.0.0.1] [jrjhj1-ospf-1-area-0.0.0.1]network 192.168.6.0 0.0.0.255 [jrjhj1-ospf-1-area-0.0.0.1]q [jrjhj1-ospf-1]area 2 [jrjhj1-ospf-1-area-0.0.0.2]network 192.168.7.0 0.0.0.255 [jrjhj1-ospf-1-area-0.0.0.2]q [jrjhj1-ospf-1] [jrjhj1-ospf-1]area 3 [jrjhj1-ospf-1-area-0.0.0.3]network 192.168.8.0 0.0.0.255 [jrjhj1-ospf-1-area-0.0.0.3]q
結果:
<jrjhj1>dis cur # sysname jrjhj1 # vlan batch 2 to 7 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 ip address 192.168.254.2 255.255.255.0 # interface Vlanif5 ip address 192.168.6.254 255.255.255.0 # interface Vlanif6 ip address 192.168.7.254 255.255.255.0 # interface Vlanif7 ip address 192.168.8.254 255.255.255.0 # interface MEth0/0/1 # interface GigabitEthernet0/0/1 port link-type access # interface GigabitEthernet0/0/2 port link-type access port default vlan 5 # interface GigabitEthernet0/0/3 port link-type access port default vlan 6 # interface GigabitEthernet0/0/4 port link-type access port default vlan 7 # interface GigabitEthernet0/0/5 # ... ospf 1 area 0.0.0.0 network 192.168.254.0 0.0.0.255 area 0.0.0.1 network 192.168.6.0 0.0.0.255 area 0.0.0.2 network 192.168.7.0 0.0.0.255 area 0.0.0.3 network 192.168.8.0 0.0.0.255 # user-interface con 0 user-interface vty 0 4 # port-group link-type # return
HXJHJ2
結果:
<jrjhj2>dis cur # sysname jrjhj2 # vlan batch 2 to 10 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 ip address 192.168.254.3 255.255.255.0 # interface Vlanif8 ip address 192.168.9.254 255.255.255.0 # interface Vlanif9 ip address 192.168.10.254 255.255.255.0 # interface Vlanif10 ip address 192.168.11.254 255.255.255.0 # interface MEth0/0/1 # interface GigabitEthernet0/0/1 port link-type access # interface GigabitEthernet0/0/2 port link-type access port default vlan 8 # interface GigabitEthernet0/0/3 port link-type access port default vlan 9 # interface GigabitEthernet0/0/4 port link-type access port default vlan 10 # ... interface NULL0 # ospf 1 area 0.0.0.0 network 192.168.254.0 0.0.0.255 area 0.0.0.1 network 192.168.9.0 0.0.0.255 area 0.0.0.2 network 192.168.10.0 0.0.0.255 area 0.0.0.3 network 192.168.11.0 0.0.0.255 # user-interface con 0 user-interface vty 0 4 # return
PC
以PC4為例
ping
實現:
1.給每種服務器創建不同VLAN劃分
2.pc1和pc2可以互相訪問
3.pc3-pc11之間可以互相訪問
網絡拓撲圖練習