Intro to Static Routing
NET-150
Why Routing?
Why Routing…
Remember this example?
Example with Simpler Addressing
Router 1
Router 2
Net 1
Net 2
Net 3
Net 4
Network 5
We connected the two routers
by adding their interfaces to another network
We can call that network Net 5
Example with Simpler Addressing
Router 1
Router 2
Net 1
Net 2
Net 3
Net 4
Router 1 now says:
“I have an interface/addresses in:
I know what to do with packets addressed to Net 1 and Net 2 and Net 5!
Net 5
Router 2 now says:
“I have an interface/addresses in:
I know what to do with packets addressed to Net 3 and Net 4 and Net 5!
Example with Simpler Addressing
Router 1
Router 2
Net 1
Net 2
Net 3
Net 4
If a computer on Net 1 tries to ping a computer on Net 4
Router 1 says:
I know what to do with packets addressed to Net 1 and Net 2 and Net 5,
But – I don’t know anything about Net 4!?!
Net 5
Similarly, if a computer on Net 3 tries to ping a computer on Net 2
Router 2 says:
I know what to do with packets addressed to Net 3 and Net 4 and Net 5,
But – I don’t know anything about Net 2!?!
Switching and Routing Tables
Routing Tables
Build Routing Table
Router | Network | Mask | Next Hop | Interface | Hops |
Central | 153.104.1.0 | /24 | Direct | G0 | - |
| 153.104.28.0 | /22 | Direct | G1 | - |
| 153.104.8.0 | /21 | WLAN RTR-Backbone IP | G0 | 1 |
| 153.104.58.0 | /23 | West RTR- Backbone IP | G0 | 1 |
| 153.104.60.0 | /23 | East RTR- Backbone IP | G0 | 1 |
West | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
Switching and Routing Tables
Network | Mask | Next Hop | Interface | |
153.104.0.0 | 255.255.0.0 | 192.168.10.1 | 2 | |
129.170.0.0 | 255.255.0.0 | 192.168.10.1 | 2 | |
192.168.10.0 | 255.255.255.0 | Direct | Connected | |
192.168.2.9 | 255.255.255.0 | Direct | Connected | |
216.87.23.0 | 255.255.255.0 | 192.168.2.2 | 3 | |
Routing Table
How are Routing Tables Built
Back to Example…
Router 1
Router 2
Net 1
Net 2
Net 3
Net 4
Router 1 says:
I know what to do with packets addressed to Net 1 and Net 2 and Net 5,
But – I don’t know anything about Nets 3 and 4!?!
STATIC Routes: Configure Router 1 with a rule that says packets for Nets 3 and 4 should go to Router 2 via Net 5!
Net 5
Router 2 says:
I know what to do with packets addressed to Net 3 and Net 4 and Net 5,
But - I don’t know anything about Nets 1 and 2!?!
STATIC Routes: Configure Router 1 with a rule that says packets for Nets 3 and 4 should go to Router 2 via Net 5!
Static Route Example
Another Example…
Static Route Configuration
Static Routes:
Configure Static Routes – Western Router
Router | Network | Mask | Next Hop | Hops |
Western | 129.170.58.0 | /24 | Direct-No Route Needed | - |
| 153.104.1.0 | /24 | Direct-No Route Needed | - |
| 129.170.60.0 | /24 | | |
| 129.170.149.0 | /24 | | |
| 129.170.150.0 | /24 | | |
Configure Static Routes – Western Router
Router | Network | Mask | Next Hop | Hops | Sample Command |
Western | 129.170.58.0 | /24 | Direct-No Route Needed | - | - |
| 153.104.1.0 | /24 | Direct-No Route Needed | - | - |
| 129.170.60.0 | /23 | 153.104.1.2 | 1 | ip route 129.170.60.0 255.255.254.0 153.104.1.2 |
| 129.170.149.0 | /24 | 153.104.1.2 | 1 | ip route 129.170.149.0 255.255.254.0 153.104.1.2 |
| 129.170.150.0 | /24 | 153.104.1.2 | 2 | ip route 129.170.150.0 255.255.254.0 153.104.1.2 |