Saturday, July 14, 2012

OS routing ( part 2)

Here we will talk about steps we need to Make windows Server (2008) act as Router

1-Click Start and open Administrative Tools then choose Server Manager.

2-In the pane, Select  Roles, and in the right pane , click add roles.

3-We will find at left "Before you begin" we will Click next.
4-Then we will check Box Beside Network Policy and Access Services and Click Next.

5-We will Click Next again, after that will appear choices we will check the Box Beside Routing and Remote Access Services ( will automatic check Boxes under it) then click next.

6-Confirm Page will appear then click INSTALL.
7- After install , choose Roles from Left and Expand it, you will find Network Policy and access Services, Expand it, you will find Routing and Remote access , click on with right click and choose Configure and Enable.....

8- First we will Click Next, Then we choose Custom Configuration and next, Then LAN Routing, Then Finish Then Start Service.


*Now Windows Server Can Act As Router , We will Talk about Configure Static Routing .

1-after we expand Routing and Remote Access we will find IPv4 IPv6 , we will try on IPv4.
2-Expand IPv4 then right click on Static Routes,choose New Static.
3- Thw window will appear it has 5 thing to specify on it:
A-Inter Face: Here you will choose inter Face(NIC) that you will USE .
B-Destination: it Can be Network-Host you want to reach.
C-Network Mask: the Net Mask  .
D-Gateway: the interface (NIC) who will forward your packet in the other Side.
E-Metric: specify the number of routers which the Packet will go through Them.

Example:




Here we want to make PC-1 Ping PC-2 now we Configure S1
1-InterFace: we choose 192.168.1.1 this inter face we will use to send from Pc-1 to Pc-2
2-Destination: here we can use 172.16.0.1 the NetWork or 172.16.0.2 the Host.
3-Network Mask: depend on what we will choose if the network we will use like 255.255.255.0 
4-Gateway: will be 10.1.1.2
5-Metric: 1 (because theres is one Router will pass throught it "S2"


*We Can use "RIP" protocol :

1-Right Click on General at IPv4, then choose New Routing Protocol
.
2- Then choose RIP and Click OK.

3-right Click on RIP and choose New Interface, then Choose NIC you want to use.





Wednesday, July 11, 2012

OS Routing

Welcome Every one have passion to learn and spend hours and days to collect information to gain full experience , in this chapter i'm trying to explain how to use OS as Routing Software and Basic knowledge about routing(algorithms and Types)  i'm trying to implement this in UNIX.(Solaris 10) and in Windows Server.(2008), i still learn till this moment like you so if you have any further information you can Post it and help me and any one will view this Blog.

First at UNIX


Routing : Routing is Simply how to forward the Packet ( the Data you Send)  from PC  To another PC Some times will be in the same LAN some time will be in Different LAN, and to Send data you need Path to send through it , here come the rule of the H.W or S.W you use in routing its who determine the path and calculate the best path and save it in table


1-Routing Protocol Types:

*Interior Gateway Protocols:

These routing protocols exchange routing information within A.S (an autonomous system). Routing Information Protocol version 2 (RIPv2), Enhanced Interior Gateway Routing (EIGRP), and Open Shortest Path First (OSPF) are examples of IGPs.



A-RIP : is a distance-vector protocol Distance Vector Algorithm that exchanges route information
between IP routers. Distance-vector algorithms obtain their name from the
fact that they compute the least-cost path by using information that is
exchanged with other routers that describes reachable networks with their
distances, in the form of hop counts. There are two versions of RIP: RIPv1
and RIPv2.

B-OSPF:  is a  link-state protocol. OSPF maintains a map of the network
topology instead of computing route paths that are based on distance
vectors in the way that RIP computes the route paths.
OSPF provides a view of the entire network and provides the shortest
path choices on routes. The map on each OSPF router is updated
regularly.




*Exterior Gateway Protocols:

An Exterior Gateway Protocol (EGP) is a routing protocol used to forward packets between A.S (autonomous systems). EGPs are used between organizations or sites, for example in a large WAN, such as the Internet or a large corporation’s intranet.


EGP and the Border Gateway Protocol (BGP) are the two principal protocols that exchange routing information among autonomous systems.








-To Display Routing table : netstat -rn 


*There are two types to Determine Routes=Paths  Static and Dynamic :


A-Static RoutesYou can configure a route that does not change or time-out. This type of
route is called a static route. Static routes are not removed from the routing table by the system.

-You Can configure Static Direct Route ( direct means at the same Network) by using " ifconfig"

The ifconfig command builds the direct route entries initially when the network interface is configured during system startup.


-/etc/defaultdouter File : Default routes are routing table entries that define the default routers to use. Default route entries can be either static entries or dynamic entries, /etc/defaultrouter file is used to define static default routes,, which lists the host names or IP addresses of the default routers. 


Hint: You must use host names that exist in the system’s /etc/inet/hosts file because no name-resolution services are available at the time that this file is read at system boot. A system that is configured with an /etc/defaultrouter file does not execute the in.routed daemon.




-/etc/gateways File: The /etc/gateways file, if it exists, is read by the in.routed daemon when the daemon starts. The in.routed daemon uses the contents of the /etc/gateways file to add additional static routes to the routing table.

# cat /etc/gateways
net 192.168.3.0 gateway sys31ext metric 1
- you can search for  more options about adding in /etc/gateways.
  • Configuring Static Routes on the Command Line:
*The "route" command can be used to add, remove, and change routing table entries.

 route add destination gateway
A-you can add the Destination as network
route add net 192.168.3.0 sys31ext

B- you can add Destination as Host
#route add host sys24 sys21ext

*To delete a route, you use the route delete command. Its basic format is:
#route delete destination gateway


*To retrieve information about a specific route, use the "route getcommand
*To change the routing table, use the "route change" command.
*To continuously report any changes to the routing table, route look-up misses, or suspected network partitioning, use the "route monitorcommand.

*To flush (remove) the routing table of all gateway entries, use the "route flush" command.




B-Dynamic Routing :


*The "in.routed" Daemon: RIPv1 and RIPv2 are implemented by the /usr/sbin/in.routed daemon. The /usr/sbin/in.routed daemon causes a system to broadcast its own routing information if IP forwarding and IP routing are enabled by the routeadm command. A router sends routing information to the networks to which it is directly connected every 30 seconds. You cannot change this time interval.


*The in.routed daemon can be stopped and started on the command line by using the "routeadm" command.


-To stop the in.routed daemon, type the command
# routeadm -u -d ipv4-routing


-To start the in.routed daemon, type the command
# routeadm -u -e ipv4-routing


-To cause the system to revert to default behavior at system boot
# routeadm -r ipv4-routing


Hint: /etc/defaultrouter should be empty .


-Turn on IP forwarding on all of the interfaces:
# routeadm -u -e ipv4-forwarding

* To Make it run win System start up :
1-creat /etc/inet/routing.conf
2-add entry in file: ipv4-routing or ipv4-forwarding


Here the end of routing at UNIX (solaris 10) after that we will try it IN Windows Server 2008