1.网络拓扑图
2.规则
(1)允许 (自己)ping通内外网,内外网随便一个pc就可以.
(2) 允许(电信)ping通内外网,内外网随便一个pc就可以 (时间问题不做了)
(3) 允许(移动)ping通内外网,内外网随便一个pc就可以 (时间问题不做了)
(4) 允许(内外互通)一台PC (时间问题不做了)
3.(先配置三层交换机192.168.254.1LSW1)进入系统试图,关闭信息功能中心,创建vlan,配置ip地址,相当于PC的网关。
sys #进入系统试图
vlan bacth 10 to 15 #创建vlan进入vlan,配置IP地址
interface Vlanif10ip address 192.168.10.254 255.255.255.0interface Vlanif11ip address 192.168.11.254 255.255.255.0interface Vlanif12ip address 192.168.12.254 255.255.255.0interface Vlanif13ip address 192.168.13.254 255.255.255.0interface Vlanif14ip address 192.168.14.254 255.255.255.0interface Vlanif15ip address 192.168.254.1 255.255.255.0
4.允许所有vlan通过,配置access模式
#批量进入端口,配置trunk模式
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/4
port link-type trunk
port trunk allow-pass vlan all#进入0/0/5口,分配vlan,(三层交换机不可以直接配置ip地址)
int g0/0/5
port link-type access
port default vlan 15
5.配置AR1路由器,配置接口的ip地址。
#进入接口,配置ip地址
interface GigabitEthernet0/0/0ip address 192.168.254.2 255.255.255.0 interface GigabitEthernet0/0/1ip address 192.168.253.1 255.255.255.0
6.配置AR5路由器,配置接口IP地址。
#配置接口IP地址,
interface GigabitEthernet0/0/0ip address 192.168.253.2 255.255.255.0 interface GigabitEthernet0/0/1interface GigabitEthernet0/0/2ip address 10.10.10.2 255.255.255.0 interface GigabitEthernet4/0/0ip address 20.10.10.254 255.255.255.0
7.配置AR6路由器,配置ip地址。
#配置接口IP地址
interface GigabitEthernet0/0/0ip address 192.168.252.2 255.255.255.0 interface GigabitEthernet0/0/1ip address 10.10.10.1 255.255.255.0 interface GigabitEthernet0/0/2ip address 200.10.10.1 255.255.255.0 interface GigabitEthernet4/0/0ip address 192.186.10.1 255.255.255.0
8.配置AR2路由器,配置ip地址
#配置接口ip地址
interface GigabitEthernet0/0/0ip address 192.168.252.2 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 200.10.10.1 255.255.255.0
#
interface GigabitEthernet4/0/0ip address 192.186.10.1 255.255.255.0
9.配置三层交换机(192.168.255.1 LSW2),进入系统试图,关闭信息功能中心,创建vlan,配置ip地址。
sys #进入用户试图
undo inf enable #关闭信息功能中心
vlan batch 20 to 25 #创建vlan
#配置vlanip地址
interface Vlanif20ip address 192.168.255.1 255.255.255.0interface Vlanif21ip address 172.168.21.254 255.255.255.0interface Vlanif22ip address 172.168.22.254 255.255.255.0interface Vlanif23ip address 172.168.23.254 255.255.255.0interface Vlanif24ip address 172.168.24.254 255.255.255.0interface Vlanif25ip address 172.168.25.254 255.255.255.0
10.允许vlan通过,配置与路由器的接口地址。(LSW2)
#批量进入端口,配置trunk模式
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/5
port link-type trunk
port trunk allow-pass vlan all#进入g0/0/6口,配置access模式interface GigabitEthernet0/0/6port link-type accessport default vlan 20
11.(内外配置完毕,现在配置外网),AR8路由器的接口和ip地址。
sys #进入用户模式
undo inf e #关闭信息功能中心#配置接口ip地址
interface GigabitEthernet0/0/0ip address 200.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 172.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 170.10.11.2 255.255.255.0
#
interface GigabitEthernet4/0/0ip address 100.10.10.254 255.255.255.0
12.配置三层交换机LSW22,配置vlanIP地址,创建vlan。
sys #进入用户试图
undo inf e #关闭信息功能中心
vlan batch 30 to 33 #创建vlan#配置vlan的ip地址
interface Vlanif30ip address 172.10.10.1 255.255.255.0
#
interface Vlanif31ip address 172.10.31.254 255.255.255.0
#
interface Vlanif32ip address 172.10.32.254 255.255.255.0
#
interface Vlanif33ip address 172.10.33.254 255.255.255.0
13.配置三层交换机LSW22,配置g0/0/1 g0/0/2 g0/0/4 为trunk模式,g0/0/口配置为access口
#配置trunk模式
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan allinterface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan allinterface GigabitEthernet0/0/4port link-type trunkport trunk allow-pass vlan all#配置access口
interface GigabitEthernet0/0/3port link-type accessport default vlan 30
14.配置三层交换机LSW23,创建vlan,配置vlan地址,进入接口配置trunk模式和access模式。
sys #进入用户模式
undo inf e #关闭信息功能中心
vlan batch 34 to 37#配置ip地址
interface Vlanif34ip address 172.10.34.254 255.255.255.0interface Vlanif35ip address 172.10.35.254 255.255.255.0interface Vlanif36ip address 172.10.36.254 255.255.255.0interface Vlanif37ip address 170.10.11.1 255.255.255.0#配置trunk模式
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4port link-type trunkport trunk allow-pass vlan 2 to 4094#配置access模式
interface GigabitEthernet0/0/1port link-type accessport default vlan 37
15.配置移动(PC21),电信(PC20),和自己(PC1)的ip地址,其他的自己去配置,不懂的私
16.允许 (自己)ping通内网,内外网随便一个pc就可以
#在LSW1上配置路由
ip route-static 192.186.10.0 255.255.255.0 192.168.254.2#在AR6上配置回程路由
ip route-static 192.168.10.0 255.255.255.0 10.10.10.2#在AR5上配置路由
ip route-static 192.186.10.0 255.255.255.0 10.10.10.1
ip route-static 192.168.10.0 255.255.255.0 192.168.253.1#在AR1上配置路由
ip route-static 192.186.10.0 255.255.255.0 192.168.253.2
ip route-static 192.168.10.0 255.255.255.0 192.168.254.1
ping通成功,内网
允许 (自己)ping通外网
#配置AR6的路由
ip route-static 172.10.31.0 24 200.10.10.2#配置AR8的路由
ip route-static 172.10.31.0 255.255.255.0 172.10.10.1
ip route-static 192.186.10.0 255.255.255.0 200.10.10.1#配置LSW22的路由
ip route-static 192.186.10.0 255.255.255.0 172.10.10.2
成功ping通外网
17.总结,由于时间的关系,我就不在往下做了,如果不懂的地方可以问我,看着拓扑图很大,其实我也没做什么配置,就配置了trunk和access,最多的还是静态路由,我是因为不太会这个,所以专挑这个联系,现在比较主流的OSPF动态路由,可以自己学习路由,以上有什么不懂的地方可以私信博主。