ospfd# show ip ospf interface

Transkrypt

ospfd# show ip ospf interface
lab-ospf
Practical experiments with
link-state protocol
Piotr Pacyna, Katarzyna Kosek-Szott, Szymon Szott
Sept. 2013.
Sieci Komputerowe II
Unauthorised copying or use is prohibited
1
Network topology
.2
.1
.0
/
2
4
R1
1
0
.1
0
R20
R2
.1
.3
1 .0
10.
6
.0 /1
.2
.1
1 0 .4 .0 .0 /1 6
.1
1 0 .5 .0 .0 /1 6
.1
.1
1
0
.2
.0
.2
10.
3 .0
.0 /1
6
R21
.0
/1
.2
6
.1
1 0 .6 .0 .0 /1 6
.1
R22
Sieci Komputerowe II
Unauthorised copying or use is prohibited
2
Starting the lab
• Use the following command to start the lab
$ ./lstart
• Check if all the network inferfaces are up
– run ifconfig on each virtual router
Sieci Komputerowe II
Unauthorised copying or use is prohibited
3
Start zebra and ospf daemons
on all routers and log in
[ Log into zebra in standard mode ]
Debian GNU/Linux testing/unstable r1 ttys/0
r1 login: root
Password: root
r1:~#
r1:~# /etc/init.d/zebra start
Starting Zebra daemons (prio:10): zebra ospfd.
r1:~#
r1:~# telnet 127.0.0.1 zebra
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Hello, this is Quagga (version 0.99.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
User Access Verification
Password: root
zebrad>
Sieci Komputerowe II
Unauthorised copying or use is prohibited
4
Get a list of zebra commands
zebrad> ?
echo
enable
exit
help
list
quit
show
terminal
who
zebrad>
Echo a message back to the vty
Turn on privileged mode command
Exit current mode and down to previous mode
Description of the interactive help system
Print command list
Exit current mode and down to previous mode
Show running system information
Set terminal line parameters
Display who is on vty
Sieci Komputerowe II
Unauthorised copying or use is prohibited
5
View information in Zebra
zebrad> list
enable
exit
help
list
quit
show debugging zebra
show history
show interface [IFNAME]
show ip forwarding
show ip route
show ip route (bgp|connected|isis|kernel|ospf|rip|static)
show ip route A.B.C.D
show ip route A.B.C.D/M
show ip route A.B.C.D/M longer-prefixes
show ip route supernets-only
show ipv6 forwarding
show ipv6 route
show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)
show ipv6 route X:X::X:X
show ipv6 route X:X::X:X/M
show ipv6 route X:X::X:X/M longer-prefixes
show logging
show memory
show memory all
show memory bgp
show memory isis
show memory lib
show memory ospf
Sieci Komputerowe II
[...]
Unauthorised copying or use is prohibited
6
Enter priviledge mode
To go to privileged mode
zebrad> enable
[ Get command list: ]
zebrad# list
To leave privileged mode
zebrad# disable
[ ... do the above if you really have to ... because we don’t need it here  ]
Sieci Komputerowe II
Unauthorised copying or use is prohibited
7
View interfaces on R2
[if the IP addresses are configured, the listing can look like this: ]
zebrad> show interface
Interface eth0 is up, line protocol detection is disabled
index 3 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 8a:06:5a:86:71:db
inet 10.10.1.1/24 broadcast 10.10.1.255
inet6 fe80::8806:5aff:fe86:71db/64
92 input packets (0 multicast), 6224 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
89 output packets, 7518 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
Interface eth1 is up, line protocol detection is disabled
index 4 metric 1 mtu 1500
flags: <UP,BROADCAST,RUNNING,MULTICAST>
HWaddr: 56:d0:63:c9:05:c3
inet 10.1.0.2/16 broadcast 10.1.255.255
inet6 fe80::54d0:63ff:fec9:5c3/64
262 input packets (0 multicast), 19448 bytes, 0 dropped
0 input errors, 0 length, 0 overrun, 0 CRC, 0 frame
0 fifo, 0 missed
100 output packets, 8760 bytes, 0 dropped
0 output errors, 0 aborted, 0 carrier, 0 fifo, 0 heartbeat
0 window, 0 collisions
[...]
Sieci Komputerowe II
Unauthorised copying or use is prohibited
8
Connect to ospf daemon
[ ... at linux command line (shell prompt) type: ]
r20:~# telnet 127.0.0.1 ospfd
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Hello, this is Quagga (version 0.99.6).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
ospfd> ?
echo
enable
exit
help
list
quit
show
terminal
who
Echo a message back to the vty
Turn on privileged mode command
Exit current mode and down to previous mode
Description of the interactive help system
Print command list
Exit current mode and down to previous mode
Show running system information
Set terminal line parameters
Display who is on vty
Sieci Komputerowe II
Unauthorised copying or use is prohibited
9
Get a list of ospf commands
ospfd> list
enable
exit
help
list
quit
show history
show ip ospf
show ip ospf border-routers
show ip ospf database
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external) (selforiginate|)
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external) A.B.C.D
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external) A.B.C.D
(self-originate|)
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external) A.B.C.D
adv-router A.B.C.D
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external) advrouter A.B.C.D
show ip ospf database (asbrsummary|external|network|router|summary|nssa-external|maxage|self-originate)
Sieci Komputerowe II
show ip ospf interface [INTERFACE]
[...]
Unauthorised copying or use is prohibited
10
Jump into privilege mode
and see privleged commands
ospfd> enable
Password: root
ospfd# ?
clear
configure
copy
debug
disable
end
exit
help
list
no
quit
show
terminal
who
write
terminal
Reset functions
Configuration from vty interface
Copy configuration
Debugging functions (see also 'undebug')
Turn off privileged mode command
End current mode and change to enable mode.
Exit current mode and down to previous mode
Description of the interactive help system
Print command list
Negate a command or set its defaults
Exit current mode and down to previous mode
Show running system information
Set terminal line parameters
Display who is on vty
Write running configuration to memory, network, or
Sieci Komputerowe II
Unauthorised copying or use is prohibited
11
Timers and time-related params.
• Hello — Interval time in seconds that a router sends an OSPF hello
•
•
•
•
•
packet. On broadcast and point-to-point links, the default is 10
seconds. On NBMA, the default is 30 seconds.
Dead — Time in seconds to wait before declaring a neighbor dead. By
default, the dead timer interval is four times the hello timer interval.
Wait — Timer interval that causes the interface to exit out of the wait
period and select a DR on the network. This timer is always equal to
the dead timer interval.
Retransmit — Time to wait before retransmitting a database
description (DBD) packet when it has not been acknowledged.
Hello Due In — An OSPF hello packet is sent on this interface after
this time. For example, a Hello will be automatically sent three
seconds from the time the show ip ospf interface has been issued.
Transmit Delay — increments the age of LSAs in update packets to
accommodate transmission and propagation delays for the interface.
The timer is more important on very low speed links where
the
Sieci Komputerowe
transmission delay is more significant. Unauthorised copying or use is prohibited
Source: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094056.shtml
II
12
Check properties of interfaces on R21
r21 ospfd# show ip ospf interface
eth0 is up, line protocol is up
Internet Address 10.1.0.1/16, Area 0.0.0.0
Router ID 10.5.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State Backup, Priority 1
Designated Router (ID) 10.10.1.1, Interface Address 10.1.0.2
Backup Designated Router (ID) 10.5.0.1, Interface Address 10.1.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 2, Adjacent neighbor count is 2
eth1 is up, line protocol is up
Internet Address 10.2.0.1/16, Area 0.0.0.0
Router ID 10.5.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State Backup, Priority 1
Designated Router (ID) 10.6.0.1, Interface Address 10.2.0.2
Backup Designated Router (ID) 10.5.0.1, Interface Address 10.2.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Neighbor Count is 1, Adjacent neighbor count is 1
[ look at: router ID, network type, DR ID, backup-DR ID, hello interval, router dead interval,
retransmit intervals, # neigbors ]
Sieci Komputerowe II
Unauthorised copying or use is prohibited
13
Check properties of interfaces on R22
ospfd# show ip ospf interface
eth0 is up
ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 10.3.0.1/16, Broadcast 10.3.255.255, Area 0.0.0.0
MTU mismatch detection:enabled
Router ID 10.6.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.6.0.1, Interface Address 10.3.0.1
Backup Designated Router (ID) 10.3.0.2, Interface Address 10.3.0.2
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
Hello due in 6.471s
Neighbor Count is 1, Adjacent neighbor count is 1
eth1 is up
ifindex 4, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
Internet Address 10.2.0.2/16, Broadcast 10.2.255.255, Area 0.0.0.0
MTU mismatch detection:enabled
Router ID 10.6.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.6.0.1, Interface Address 10.2.0.2
Backup Designated Router (ID) 10.5.0.1, Interface Address 10.2.0.1
Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
Hello due in 9.875s
Neighbor Count is 1, Adjacent neighbor count is 1
[...]
[ again look at: router ID, network type, DR ID, backup-DR ID, hello interval, router dead interval,
retransmit intervals, # neigbors ]
[ compare eth1@R21 with eth1@R22. Check neighbours, DR,
router IDs ... ]
Sieci Komputerowe II
Unauthorised copying or use is prohibited
14
Check neighbours of R21
r21 ospfd# show ip ospf neighbor
Neighbor ID Pri State
Dead Time Address
10.3.0.2
1 Full/DROther
30.249s 10.1.0.2
10.1.0.3
1 Full/Backup
30.247s 10.1.0.3
10.6.0.1
1 Full/DR
33.683s 10.2.0.2
Interface
eth0:10.1.0.1
eth0:10.1.0.1
eth1:10.2.0.1
RXmtL RqstL DBsmL
0
0
0
0
0
0
0
0
0
Check neighbours of R22
r22 ospfd# show ip ospf neighbor
Neighbor ID Pri State
Dead Time Address
10.3.0.2
1 Full/Backup
30.448s 10.3.0.2
10.5.0.1
1 Full/Backup
33.952s 10.2.0.1
Interface
eth0:10.3.0.1
eth1:10.2.0.2
RXmtL RqstL DBsmL
0
0
0
0
0
0
Sieci Komputerowe II
Unauthorised copying or use is prohibited
15
Configure interface eth0
using command line
ospfd(config)# interface eth0
ospfd(config-if)# ?
description Interface specific description
end
End current mode and change to enable mode.
exit
Exit current mode and down to previous mode
help
Description of the interactive help system
ip
IP Information
list
Print command list
mpls-te
MPLS-TE specific commands
no
Negate a command or set its defaults
ospf
OSPF interface commands
quit
Exit current mode and down to previous mode
show
Show running system information
write
Write running configuration to memory, network, or terminal
Sieci Komputerowe II
Unauthorised copying or use is prohibited
16
Check what we can configure ?
ospfd(config-if)# ip ospf ?
authentication-key
Authentication password (key)
cost
Interface cost
dead-interval
Interval after which a neighbor is declared
dead
hello-interval
Time between HELLO packets
message-digest-key
Message digest authentication password (key)
network
Network type
priority
Router priority
retransmit-interval Time between retransmitting lost link state
advertisements
transmit-delay
Link state transmit delay
... and change it
Sieci Komputerowe II
Unauthorised copying or use is prohibited
17
Modify values for some params
ospfd(config-if)# ip ospf cost 10
ospfd(config-if)# ip ospf hello-interval 60
ospfd(config-if)# ip ospf retransmit-interval 5
ospfd(config-if)# ip ospf dead-interval 240
ospfd(config-if)# ip ospf priority 124
Sieci Komputerowe II
Unauthorised copying or use is prohibited
18
You can also change link type
ospfd(config-if)# ospf
broadcast
non-broadcast
point-to-multipoint
point-to-point
network
Specify
Specify
Specify
Specify
?
OSPF
OSPF
OSPF
OSPF
broadcast multi-access network
NBMA network
point-to-multipoint network
point-to-point network
ospfd(config-if)# ospf network point-to-point
ospfd# show running-config
Current configuration:
!
hostname ospfd
password root
enable password root
log file /var/log/zebra/ospfd.log
!
!
!
interface eth0
ip ospf network point-to-point
ip ospf cost 10
ip ospf hello-interval 60
ip ospf dead-interval 240
* * *
Sieci Komputerowe II
Unauthorised copying or use is prohibited
19
Write changes
ospfd(config-if)# write
Sieci Komputerowe II
Unauthorised copying or use is prohibited
20
View interface configuration
after changes
[ in ospf priviledge mode ]
ospfd# show ip ospf interface
eth0 is up, line protocol is up
Internet Address 10.1.0.1/16, Area 0.0.0.0
Router ID 10.5.0.1, Network Type POINTOPOINT, Cost: 10
Transmit Delay is 1 sec, State Point-To-Point, Priority 1
No designated router on this network
No backup designated router on this network
Timer intervals configured, Hello 60, Dead 240, Wait 240, Retransmit 5
Hello due in 00:00:14
Neighbor Count is 0, Adjacent neighbor count is 0
eth1 is up, line protocol is up
Internet Address 10.2.0.1/16, Area 0.0.0.0
Router ID 10.5.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State Backup, Priority 1
Designated Router (ID) 10.6.0.1, Interface Address 10.2.0.2
Backup Designated Router (ID) 10.5.0.1, Interface Address 10.2.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Neighbor Count is 1, Adjacent neighbor count is 1
Sieci Komputerowe II
Unauthorised copying or use is prohibited
21
Configure interface
using command line
ospfd# configure terminal
ospfd(config)# ?
access-list Add an access list entry
banner
Set banner string
debug
Debugging functions (see also 'undebug')
enable
Modify enable password parameters
end
End current mode and change to enable mode.
exit
Exit current mode and down to previous mode
help
Description of the interactive help system
hostname
Set system's network name
interface
Select an interface to configure
ip
IP information
ipv6
IPv6 information
line
Configure a terminal line
list
Print command list
log
Logging control
no
Negate a command or set its defaults
password
Assign the terminal connection passwordospfd(config)#
interface eth0
Sieci Komputerowe II
Unauthorised copying or use is prohibited
22

Podobne dokumenty