Friday, May 8, 2015

Computer Networks: Static and Dynamic Routing- Configuration Commands

 

Protocol

Commands

Remarks

RIPv2

Router(config)#router rip

Enables RIP as a routing protocol.

Router(config-router)#version 2

RIP will now send and receive RIPv2 packets globally.

Router(config-router)#network w.x.y.z

w.x.y.z is the network number of the directly connected network you want to advertise.

Router(config-router)#no auto-summary

RIPv2 summarizes networks at the classful boundary. This command turns auto-summarization off.

Router(config-router)#passive-interface s0/1

RIP updates will not be sent out this interface.

Router(config-router)#default-information

originate

Generates a default route into RIP.

OSPF

Router(config)#router ospf 123

Starts OSPF process 123. The process

ID is any positive integer value between 1 and 65,535. The process

ID is not related to the OSPF area.

The process ID merely distinguishes one process from another within the device.

Router(config-router)#network 172.16.10.0 0.0.0.255 area 0

OSPF advertises interfaces, not networks. Uses the wildcard mask to determine which interfaces to advertise. Read this line to say “Any interface with an address of 172.16.10.x is to be put into area 0.”

NOTE: The process ID number of one router does not have to match the process ID of any other router.

Router(config-router)#network 172.16.10.1 0.0.0.0 area 0

Read this line to say “Any interface with an exact address of 172.16.10.1 is to be put into area 0.”

Router(config-router)#network 172.16.10.0 0.0.255.255 area 0

Read this line to say “Any interface with an address of 172.16.x.x is to be put into area 0.”

Router(config-router)#network 0.0.0.0

255.255.255.255 area 0

Read this line to say “Any interface

with any address is to be put into area

0.”

Router(config-router)#default-information originate

Advertises default route

EIGRP

Router(config)#router eigrp 100

Turns on the EIGRP process. 100 is the autonomous system number, which can be a number between 1 and 65,535.

All routers in the same autonomous system must use the same autonomous system number.

Router(config-router)#network 10.0.0.0

Specifies which network to advertise in EIGRP.

Router(config-if)#bandwidth x

Sets the bandwidth of this

interface to x kilobits to allow

EIGRP to make a better metric calculation.

Router(config-router)#network 10.0.0.0 0.255.255.255

Identifies which interfaces or

networks to include in

EIGRP. Interfaces must be configured with addresses that fall within the wildcard mask range of the network statement. A network mask can also be used here.

Router(config-router)#metric weights tos k1 k2 k3 k4 k5

Changes the default k values used in metric calculation.

These are the default values:

tos=0, k1=1, k2=0, k3=1,

k4=0, k5=0

Router(config-router)#no auto-summary

Turns off the auto-summarization feature.

Router(config-router)#redistribute static

Advertises static routes

 

 

Example 1:

RIPv2

Router(config)#router rip

Router(config-router)#version 2

Router(config-router)#network 192.168.0.0

Router(config-router)#network 10.10.10.0

Router(config-router)#no auto-summary

Router(config-router)#exit

 

Example 2:

OSPF

Router(config)#router ospf 1

Router(config-router)#network 10.130.8.0 0.0.0.255 area 0

Router(config-router)#network 172.16.10.0 0.0.255.255 area 0

router(config-router)#default-information originate

Router(config-router)#exit

 

Example 3:

EIGRP

Router(config)#router eigrp 1

Router(config-router)#network 172.16.0.0

Router(config-router)#network 192.168.10.8 0.0.0.3

Router(config-router)#no auto-summary

Router(config-router)#redistribute static

Router(config-router)#exit

 

 

 

Interfaces

1.   Loopback interface

Router(config)#int loopback 3

Router(config-if)#ip address 10.10.10.1 255.255.255.0

 

2.   Default route

Router(config)# ip route 0.0.0.0 0.0.0.0 [next_hop_address]

Example: Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.12.1

Note: next_hop_address means the interface of the other Router through which the packets will be sent.

Or,

Router(config)# ip route 0.0.0.0 0.0.0.0 [interface_of_router]

Example: Router(config)# ip route 0.0.0.0 0.0.0.0 se2/0

 

3.   Static route

Router(config)# ip route [source_net_addr] [sub_mask] [next_hop_address]

Example: Router(config)# ip route 192.168.8.0 255.255.248.0 192.168.9.2

No comments:

Post a Comment