Ospf多区域配置

R1配置:

[r1-Ethernet1]inter e0

[r1-Ethernet0]ip address 192.168.1.1 24

[r1-Ethernet0]

%01:08:50: Line protocol ip on the interface Ethernet0 is UP

[r1-Ethernet0]loopback

 [r1-Ethernet1]inter s0

[r1-Serial0]ip address 192.168.2.1 24

[r1-Serial0]

%01:04:18: Line protocol ip on the interface Serial0 is UP

[r1-Serial0]quit

 [r1]ospf en

  Start OSPF task...

  OSPF enabled

[r1-ospf]inter e0

[r1-Ethernet0]ospf en area 1

[r1-Ethernet0]inter s0

[r1-Serial0]ospf en area 1

[r1-Serial0]quit

[r1]local-user user1 pass sim 123 ser adm

R2配置:

[r2]inter s0

[r2-Serial0]ip address 192.168.2.2 24

[r2-Serial0]

%22:11:23: Line protocol ip on the interface Serial0 is UP

[r2-Serial0]inter s1

[r2-Serial1]ip address 192.168.3.1 24

[r2-Serial1]

%22:11:47: Line protocol ip on the interface Serial1 is UP

[r2-Serial1]inter s0

[r2-Serial0]shut

% Interface Serial0 is shut down

[r2-Serial0]

%22:12:01: Interface Serial0 is DOWN

%22:12:01: Line protocol ip on the interface Serial0 is DOWN

[r2-Serial0]undo shut

% Interface Serial0 is reset

[r2-Serial0]

%22:12:11: Interface Serial0 is UP

%22:12:11: Line protocol ip on the interface Serial0 is UP

 

[r2-Serial0]quit

[r2]ospf en

  Start OSPF task...

  OSPF enabled

[r2-ospf]inter s0

[r2-Serial0]ospf en area 1

[r2-Serial0]inter s1

[r2-Serial1]ospf en area 0

[r2-Serial1]inter e0

[r2-Ethernet0]ip address 192.168.6.1 24

[r2-Ethernet0]quit

[r2]rip

    waiting...

  RIP is running

[r2-rip]network 192.168.6.0

 [r2-rip]quit

[r2]local-user user1 pass sim 123 ser adm

[r2]

R3配置:

[r3]inter s0

[r3-Serial0]ip address 192.168.3.2 24

[r3-Serial0]

%01:19:44: Line protocol ip on the interface Serial0 is UP

[r3-Serial0]shut

% Interface Serial0 is down

[r3-Serial0]

%01:19:49: Interface Serial0 is DOWN

[r3-Serial0]undo shut

% Interface Serial0 is reset

[r3-Serial0]

%01:19:57: Interface Serial0 is UP

%01:19:57: Line protocol ip on the interface Serial0 is UP

[r3-Serial0]inter s1

[r3-Serial1]ip address 192.168.4.1 24

[r3-Serial1]

%01:20:17: Line protocol ip on the interface Serial1 is UP

[r3-Serial1]

S0.s1接口配置ospf协议

[r3-Serial0]inter s0

[r3-Serial0]ospf enable area 0

[r3-Serial0]inter s1

[r3-Serial1]ospf enable area 2

[r3-Serial1]quit

[r3]local-user user1 pass sim 123 ser adm

[r3]

[r5]vlan 10

[r5-vlan10]port e0/24

[r5-vlan10]inter vlan 10

[r5-Vlan-interface10]ip address 192.168.6.2 24

                                            ^

 % Wrong parameter found at '^' position.

[r5-Vlan-interface10]ip address 192.168.6.2 255.255.255.0

[r5-Vlan-interface10]

[r5]vlan 20

[r5-vlan20]port e0/2

[r5-vlan20]inter vlan 20

[r5-Vlan-interface20]ip address 192.168.7.1 255.255.255.0

[r5-Vlan-interface20]

[r5]rip

[r5-rip]network 192.168.6.0

[r5-rip]network 192.168.7.0

 [r5]local-user user1

New local user added.

[r5-luser-user1]password ?

  cipher  Display password with cipher text

  simple  Display password with plain text

 

[r5-luser-user1]password sim ?

  STRING<1-16>/<24>  Plain text/cipher text password string

 

[r5-luser-user1]password sim 123

[r5-luser-user1]?                

Luser view commands:

  attribute     Specify  attributes of local user

  display       Display current system information

  password      Specify password of local user

  ping          Ping function

  quit          Exit from current command view

  service-type  Specify service-type of local user

  state         Specify state of local user

  tracemac      Trace MAC function

  tracert       Trace route function

  undo          Cancel current setting

 

[r5-luser-user1]service-type telnet level 3

[r5-luser-user1]

 

R6配置:

 [r6]fire packet-filter default permit

 [r6]firewall zone trust

[r6-zone-trust]add interface eth0/0

 The interface has been added to trust security zone.

[r6]inter Ethernet 0/0

[r6-Ethernet0/0]ip address 192.168.7.2 24

[r6-Ethernet0/0]

[r6]rip

[r6-rip]network 192.168.8.0

[r6-rip]network 192.168.7.0

 [r6-rip]quit

[r6]local-user user1

New local user added.

[r6-luser-user1]password sim 123

[r6-luser-user1]ser telnet level 3

 

进入R2

[r2]ospf

[r2-ospf]import-route rip

[r2-ospf]import-route direct

[r2-ospf]quit

[r2]int null0

Ip route 0.0.0.0 0 null 0

Quit

Rip

Import-route static

 

测试: