Difference between revisions of "Basic Routing Example"

From StarOS Community Wiki
Jump to navigation Jump to search
(formatting, wpci0/ether0 --> wpci1/ether1 for StarOS naming convention)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Star-V3 Static Route Example ==
== StarV3 Static Routing Example ==
 
Using the A, B and C example explained in [[Routing 101]], I'll provide some basic static routing information using StarV3.  This basic example is using all private address space on an internal network.  I am not getting into NAT or public IP addresses or anything like that, it is meant to show a very basic static routing example for people to get to know the basics.
 
----
 
 
Using the A B and C example explained in the previous section "Routing 101" I'll give some basic static route information using Star-V3.  This basic example is using all private address space on an internal network.  I am not getting into NAT or Public IPs or anything like that, it is meant to show a very basic static route example for people to get to know the basics.




'''Router A'''  
'''Router A'''  


 
Has an ip assigned to its ether1 interface on the subnet of the network it is physically connected to.  Lets say that ip is 192.168.1.254/24 And its wpci1 interface has an ip on the same subnet of the interface it is connected to on Router B.  Lets say Router A's wpci1 ip is 10.1.1.1/24.
Has an ip assigned to its ether0 interface on the subnet of the network it is physically connected to.  Lets say that ip is 192.168.1.254/24 And its wpci0 interface has an ip on the same subnet of the interface it is connected to on Router B.  Lets say Router A's wpci0 ip is 10.1.1.1/24.




Line 18: Line 12:


Following the same example above,  
Following the same example above,  
ether0 192.168.2.254/24
ether1 192.168.2.254/24
wpci0 10.1.1.2/24 (connected to router A)
wpci1 10.1.1.2/24 (connected to router A)
wpci1 10.1.2.1/24 (same subnet as wpci0 on Router C)
wpci2 10.1.2.1/24 (same subnet as wpci1 on Router C)




'''Router C'''
'''Router C'''
ether0 192.168.3.254/24
ether1 192.168.3.254/24
wpci0 10.1.2.2/24 (connected to wpci1 on router B)
wpci1 10.1.2.2/24 (connected to wpci1 on router B)




=== Static Routes ===
=== Static Routes ===
Now that we have the ip addressing down, we can get to the routes for router A to be able to ping the networks on B and C.
Now that we have the ip addressing down, we can get to the routes for router A to be able to ping the networks on B and C.


Line 36: Line 28:
'''Router A Static Routes'''
'''Router A Static Routes'''


In order for router A to reach the network on the ether0 side of router B we nedd to add the following route to router A's static routing table ->routing->static and default routes in the Star-os menu.
In order for router A to reach the network on the ether1 side of router B we need to add the following route to router A's static routing table ->routing->static and default routes in the StarV3 menu system.




'''network address  -  192.168.2.0  network mask  -  255.255.255.0    gateway address  -  10.1.1.2'''
'''network address  -  192.168.2.0  network mask  -  255.255.255.0    gateway address  -  10.1.1.2'''


This statement say's that in order for a packet from router A's 192.168.1.0/24 network to reach router B's 192.168.2.0/24 network it must go through router B's wireless interface wpci0 10.1.1.2/24 (the gateway).
This statement say's that in order for a packet from router A's 192.168.1.0/24 network to reach router B's 192.168.2.0/24 network it must go through router B's wireless interface wpci1 10.1.1.2/24 (the gateway).




Line 50: Line 42:




This statement say's that in order for router A's network to reach router C's network go through gateway 10.1.1.2 (router B's Wireless interface wpci0)
This statement say's that in order for router A's network to reach router C's network go through gateway 10.1.1.2 (router B's Wireless interface wpci1)


Thats it for router A.  It now knows how to get to router B's network and router C's network.  On to router B....
Thats it for router A.  It now knows how to get to router B's network and router C's network.  On to router B....
Line 82: Line 74:




'''network address - 192.168.1.0 network mask 255.255.255.0 gateway address 10.1.2.1''' (router B's wireless interface wpci1)
'''network address - 192.168.1.0 network mask 255.255.255.0 gateway address 10.1.2.1''' (router B's wireless interface wpci2)


To get to router B's network
To get to router B's network




'''network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.2.1''' (router B's wireless interface wpci1)
'''network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.2.1''' (router B's wireless interface wpci2)
 
 
That is the basic example.  Just remember that for static routes to work you must have a route to the destination and the destination also needs to know the route to get back.
 
 
{{stub}}

Latest revision as of 13:45, 9 December 2006

StarV3 Static Routing Example

Using the A, B and C example explained in Routing 101, I'll provide some basic static routing information using StarV3. This basic example is using all private address space on an internal network. I am not getting into NAT or public IP addresses or anything like that, it is meant to show a very basic static routing example for people to get to know the basics.


Router A

Has an ip assigned to its ether1 interface on the subnet of the network it is physically connected to. Lets say that ip is 192.168.1.254/24 And its wpci1 interface has an ip on the same subnet of the interface it is connected to on Router B. Lets say Router A's wpci1 ip is 10.1.1.1/24.


Router B


Following the same example above,

ether1 192.168.2.254/24
wpci1 10.1.1.2/24 (connected to router A)
wpci2 10.1.2.1/24 (same subnet as wpci1 on Router C)


Router C

ether1 192.168.3.254/24
wpci1 10.1.2.2/24 (connected to wpci1 on router B)


Static Routes

Now that we have the ip addressing down, we can get to the routes for router A to be able to ping the networks on B and C.


Router A Static Routes

In order for router A to reach the network on the ether1 side of router B we need to add the following route to router A's static routing table ->routing->static and default routes in the StarV3 menu system.


network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.1.2

This statement say's that in order for a packet from router A's 192.168.1.0/24 network to reach router B's 192.168.2.0/24 network it must go through router B's wireless interface wpci1 10.1.1.2/24 (the gateway).


In order for router A to reach router C we add the next statement:


network address - 192.168.3.0 network mask - 255.255.255.0 gateway address - 10.1.1.2


This statement say's that in order for router A's network to reach router C's network go through gateway 10.1.1.2 (router B's Wireless interface wpci1)

Thats it for router A. It now knows how to get to router B's network and router C's network. On to router B....


Router B Stactic Routes


First statement to get back to router A:


network address - 192.168.1.0 network mask 255.255.255.0 gateway address - 10.1.1.1 (wireless interface of router A)


And to get to router C:


network address 192.168.3.0 network mask 255.255.255.0 gateway address 10.1.2.2 (wireless interface of router C)


Now router B can get back to router A and get to router C


Router C Static Routes


For router C we do basically the same thing as we did for router A but in reverse:


To get to router A's network


network address - 192.168.1.0 network mask 255.255.255.0 gateway address 10.1.2.1 (router B's wireless interface wpci2)

To get to router B's network


network address - 192.168.2.0 network mask - 255.255.255.0 gateway address - 10.1.2.1 (router B's wireless interface wpci2)


That is the basic example. Just remember that for static routes to work you must have a route to the destination and the destination also needs to know the route to get back.