The main function of router is to route the network traffic from one network segment to another one. Routers have a route database. According this database the traffic is routed by the network devices. In our days there are two ways of routing:
-Routing protocols(dynamic routing)
-Static routing
-Routing protocols(dynamic routing)
-Static routing
Routing protocols give the possibility to dynamically know the information about paths from one network to another. They are RIP, EIGRP, BGP, OSPF, IS-IS.
When you configure static routing, you manually write the path from one network to another. I am going to describe how to configure static routing on CISCO routers.
When you configure static routing, you manually write the path from one network to another. I am going to describe how to configure static routing on CISCO routers.
For configuring a path from one network to another you should write the following command:
ip route (destination ip network address) (mask) (interface/next hop ip address)
ip route (destination ip network address) (mask) (interface/next hop ip address)
If there is no information about destination network (network address) in router, it will send all packets to a default gateway.
For configuring default gateway you should enter the following command:
ip route 0.0.0.0 0.0.0.0 (interface/ next hop ip address)
ip route 0.0.0.0 0.0.0.0 (interface/ next hop ip address)
If you want to see the routing table in CISCO router, you should enter "show ip route" command.
You can find example of configuring static routing on CISCO device below:
Router>enable
Router#configure terminal
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
Router(config)#ip route 192.168.3.0 255.255.255.0 fa0/0
Router>enable
Router#configure terminal
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
Router(config)#ip route 192.168.3.0 255.255.255.0 fa0/0
Notification:
192.168.1.2 is a default gateway
192.168.1.2 is a default gateway
Комментариев нет:
Отправить комментарий