配置RIP、OSPF实现全网互通
【实验需求】
1.二层交换机根据拓扑配置VLAN,将接口加入对应的VLAN ;并配置链路聚合,将接口加入链路。
2.R2、R3之间配置OSPF,R3、R4、R5之间配置RIP版本2。
3.R1与R2之间配置静态路由及默认路由。
4.配置重分发,实现全网互通。
5.配置NAT,将服务器映射到外网接口G0/0/0上

具体命令
SW1:
vlan batch 10 20 30 40
[sw1]int Eth-Trunk 1
[sw1-Eth-Trunk1]qui
[sw1-Eth-Trunk1]quit
[sw1]interface Ethernet0/0/3
[sw1-Ethernet0/0/3]et
[sw1-Ethernet0/0/3]eth-trunk 1
[sw1]interface Ethernet0/0/2
[sw1-Ethernet0/0/2]e
[sw1-Ethernet0/0/2]eth-trunk 1
[sw1]int Eth-Trunk1
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]port trunk allow-pass vlan all

[sw1]int Ethernet0/0/4
[sw1-Ethernet0/0/4]port link-type access
[sw1-Ethernet0/0/4]port default vlan 10
[sw1-Ethernet0/0/4]interface Ethernet0/0/5
[sw1-Ethernet0/0/5]port link-type access
[sw1-Ethernet0/0/5]port default vlan 20

[sw1]int Ethernet0/0/1
[sw1-Ethernet0/0/1]port link-type trunk
[sw1-Ethernet0/0/1]port trunk allow-pass vlan all

SW2:
vlan batch 10 20 30 40
[sw1]int Eth-Trunk 1
[sw1-Eth-Trunk1]quit
[sw1]interface Ethernet0/0/3
[sw1-Ethernet0/0/3]eth-trunk 1
[sw1]interface Ethernet0/0/2
[sw1-Ethernet0/0/2]e
[sw1-Ethernet0/0/2]eth-trunk 1
[sw1]int Eth-Trunk1
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]port trunk allow-pass vlan all

[sw2]int Ethernet0/0/4
[sw2-Ethernet0/0/4]port link-type access
[sw2-Ethernet0/0/4]port default vlan 30
[sw2-Ethernet0/0/4]quit
[sw2-Ethernet0/0/4]int Ethernet0/0/5
[sw2-Ethernet0/0/5]port link-type access
[sw2-Ethernet0/0/5]port default vlan 40

SW3:
[sw3]vlan batch 50 60
[sw3]int Ethernet0/0/2
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]port default vlan 50
[sw3-Ethernet0/0/2]quit
[sw3]int
[sw3]interface Ethernet0/0/3
[sw3-Ethernet0/0/3]port link-type access
[sw3-Ethernet0/0/3]port default vlan 60
[sw3-Ethernet0/0/3]quit
[sw3]int Ethernet0/0/1
[sw3-Ethernet0/0/1]port link-type trunk
[sw3-Ethernet0/0/1]port trunk allow-pass vlan all

ISP:
[ISP]int GigabitEthernet 0/0/1
[ISP-GigabitEthernet0/0/1]ip address 192.168.1.254 24
[ISP-GigabitEthernet0/0/1]quit
[ISP]int GigabitEthernet 0/0/0
[ISP-GigabitEthernet0/0/0]ip address 192.168.2.1 24

R2:
[R2]int GigabitEthernet 0/0/2.10

[R2-GigabitEthernet0/0/2.10]dot1q termination vid 10
[R2-GigabitEthernet0/0/2.10]arp broadcast enable
[R2-GigabitEthernet0/0/2.10]ip add 192.168.10.254 24

[R2]int GigabitEthernet 0/0/2.20
[R2-GigabitEthernet0/0/2.20]dot1q termination vid 20
[R2-GigabitEthernet0/0/2.20]arp broadcast enable
[R2-GigabitEthernet0/0/2.20]ip add 192.168.20.254 24

[R2]int GigabitEthernet 0/0/2.30
[R2-GigabitEthernet0/0/2.30]dot1q termination vid 30
[R2-GigabitEthernet0/0/2.30]arp broadcast enable
[R2-GigabitEthernet0/0/2.30]ip add 192.168.30.254 24

[R2]int GigabitEthernet 0/0/2.40
[R2-GigabitEthernet0/0/2.40]dot1q termination vid 40
[R2-GigabitEthernet0/0/2.40]arp broadcast enable
[R2-GigabitEthernet0/0/2.40]ip add 192.168.40.254 24

R4:
[R4]interface GigabitEthernet 0/0/2.50
[R4-GigabitEthernet0/0/2.50]dot1q termination vid 50
[R4-GigabitEthernet0/0/2.50]arp broadcast enable
[R4-GigabitEthernet0/0/2.50]ip address 192.168.50.254 24
[R4-GigabitEthernet0/0/2.50]quit
[R4]int GigabitEthernet 0/0/2.60
[R4-GigabitEthernet0/0/2.60]dot1q termination vid 60
[R4-GigabitEthernet0/0/2.60]arp broadcast enable
[R4-GigabitEthernet0/0/2.60]ip add 192.168.60.254 24

验证vlan互通
配置RIP、OSPF实现全网互通
配置RIP、OSPF实现全网互通
配置接口IP,RIP以及OSPF。
R2:
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.40.0 0.0.0.255
R3:
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 192.168.4.0
[r3-rip-1]undo summary
R4:
[R4]rip 1
[R4-rip-1]ver 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.5.0
[R4-rip-1]network 192.168.50.0
[R4-rip-1]network 192.168.60.0
[R4-rip-1]undo summary
R5:
[r5]rip 1
[r5-rip-1]ver 2
[r5-rip-1]network 192.168.5.0
[r5-rip-1]network 192.168.6.0
[R5-rip-1]undo summary
验证:路由器查看路由表可以看见各自协议宣告的网段。
3. 外网配置静态路由。
[R2]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2
4. 配置重分发,实现全网互通。
[R2]ospf 1
[R2-ospf-1]import-route static
[R2-ospf-1]import-route direct
[r3-ospf-1]rip 1
[r3-rip-1]import-route ospf 1
[r3]ospf 1
[r3-ospf-1]import-route rip 1
验证:全网可以互通
配置RIP、OSPF实现全网互通
配置NAT。
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]nat server protocol tcp global 192.168.2.10 www inside 192.168.6.1 www
验证:可以通过映射的接口访问到192.168.6.1www服务器。
配置RIP、OSPF实现全网互通
配置RIP、OSPF实现全网互通

相关文章:

  • 2021-10-24
  • 2021-08-05
  • 2021-10-30
  • 2021-04-18
  • 2021-09-09
  • 2021-08-15
  • 2022-01-06
  • 2022-01-18
猜你喜欢
  • 2021-04-03
  • 2021-12-27
  • 2021-08-08
  • 2022-01-03
  • 2021-09-21
  • 2021-07-27
相关资源
相似解决方案