网络工程——专业实习训练(拓扑搭建2)

OSPF的原理及配置方法

        ospf(Open Shortest Path First,开放式最短路径优先)是一种链路状态路由协议,属于内部网关协议(IGP),是目前现网中使用最广泛的IGP路由协议。

 

网络工程——专业实习训练(拓扑搭建2)_第1张图片

 配置命令

R1

interface GigabitEthernet0/0/0
 ip address 192.168.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.16.1 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 192.168.13.1 255.255.255.0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.0
#
ospf 1 router-id 1.1.1.1
 area 0.0.0.0
  network 1.1.1.0 0.0.0.255
  network 192.168.12.0 0.0.0.255
  network 192.168.13.0 0.0.0.255
 area 0.0.0.4
  network 192.168.16.0 0.0.0.255
  nssa no-summary

R2

vlan batch 10 20
#
interface GigabitEthernet0/0/0
 ip address 192.168.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.23.1 255.255.255.0
#
interface GigabitEthernet0/0/2.10
 dot1q termination vid 10
 ip address 192.168.10.254 255.255.255.0
 arp broadcast enable
#
interface GigabitEthernet0/0/2.20
 dot1q termination vid 20
 ip address 192.168.20.254 255.255.255.0
 arp broadcast enable
#
interface GigabitEthernet0/0/3
 ip address 192.168.24.1 255.255.255.0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.0
#
ospf 1 router-id 2.2.2.2
 area 0.0.0.0
  network 2.2.2.0 0.0.0.255
  network 192.168.23.0 0.0.0.255
  network 192.168.12.0 0.0.0.255
 area 0.0.0.1
  network 192.168.10.0 0.0.0.255
  network 192.168.20.0 0.0.0.255
  network 192.168.24.0 0.0.0.255
  vlink-peer 4.4.4.4

R3

interface GigabitEthernet0/0/1
 ip address 192.168.24.2 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 192.168.45.1 255.255.255.0
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0
#
ospf 1 router-id 4.4.4.4
 area 0.0.0.1
  network 192.168.24.0 0.0.0.255
  network 4.4.4.0 0.0.0.255
  vlink-peer 2.2.2.2
 area 0.0.0.3
  network 192.168.45.0 0.0.0.255

R4

interface GigabitEthernet0/0/0
 ip address 192.168.45.2 255.255.255.0
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.0
#
ospf 1 router-id 5.5.5.5
 area 0.0.0.3
  network 5.5.5.0 0.0.0.255
  network 192.168.45.0 0.0.0.255

SW1

vlan batch 10 20
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20

SW2

vlan batch 30 40 50 60
#
interface Vlanif30
 ip address 192.168.30.254 255.255.255.0
#
interface Vlanif40
 ip address 192.168.40.254 255.255.255.0
#
interface Vlanif50
 ip address 192.168.13.2 255.255.255.0
#
interface Vlanif60
 ip address 192.168.23.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 60
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 50
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 30
#
interface GigabitEthernet0/0/4
 port link-type access
 port default vlan 40
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.0
#
ospf 1 router-id 3.3.3.3
 area 0.0.0.0
  network 3.3.3.0 0.0.0.255
  network 192.168.23.0 0.0.0.255
  network 192.168.13.0 0.0.0.255
 area 0.0.0.2
  network 192.168.30.0 0.0.0.255
  network 192.168.40.0 0.0.0.255

R6

interface LoopBack0
 ip address 6.6.6.6 255.255.255.0
#
interface LoopBack1
 ip address 8.8.8.8 255.255.255.0
#
interface LoopBack2
 ip address 9.9.9.9 255.255.255.0
#
ospf 1 router-id 6.6.6.6
 import-route direct
 area 0.0.0.4
  network 6.6.6.0 0.0.0.255
  network 8.8.8.0 0.0.0.255
  network 192.168.16.0 0.0.0.255
  nssa no-summary

你可能感兴趣的:(ensp网络实训报告,开发语言,网络协议,网络安全,华为,测试工具)