Type the command route print. This should display results similar to Figure 5-21. This

Implementing TCPIP in the Command Line | 117 There is also an IPv6 Route Table if you are running that protocol. This table shows link-local and global unicast address line items.

11. Add and remove routes. Adding a router requires syntax similar to the netsh command

we used to add IP addresses. In the following portion of this exercise, we will add a fictitious route using our local IP address as the interface that makes the connection to the remote network:

a. Type the command route add 192.168.1.0 mask 255.255.255.0

[LocalIPAddress]. An example of this is shown in Figure 5-22. Figure 5-22 Route add The network we are attempting to connect to is 192.168.1.0, and it has a default Class C subnet mask of 255.255.255.0. The word “mask” takes the place of “sub- net mask.” Then we used our local IP address, in this case 10.254.254.112, to connect to the remote network. After we pressed Enter, a simple OK Message appeared. This means that the route has been added to the local routing table.

b. Type the command route print. You will see the new route in the IPv4 Route

Table, as shown in Figure 5-23. The new route is created for the network address 192.168.1.0, as well as for the broadcast address 192.168.1.255.

c. Type the command route delete 192.168.1.0 mask 255.255.255.0. This should

remove the route you added previously. You could also remove all added routes with one command: route -f. But be careful with this command. Depending on the operating system and protocols used, as well as the network configuration, this could stop all network connections. Figure 5-23 Route print with a new route New route 118 | Lesson 5 d. Type the command route print to view the results. If you start to have any issues with your routing table, consider stopping and restarting TCPIP, or even restarting the computer. By the way, TCPIP can be reset in the command line by typing the following command: netsh int ip reset c:\resetlog.txt. Generally, these added routes will be lost if TCPIP or the computer is restarted. However, routes can also be added in a persistent manner by using the –p option. The p stands for persistent; it preserves the route within the registry even if TCPIP is restarted. Again, the idea behind routing is to make connections to remote networks. See Figure 5-24 for some network documentation. Figure 5-24 Routing documentation Cloud Router A Router B Switch A Switch B LAN A LAN B E 10.254.254.1 E 10.253.253.1 S 63.21.15.121 S 63.21.15.128 In the figure, there are two LANs, LAN A and LAN B. By default, computers on these LANs would not be able to talk to each other because they are separated by routers and the “cloud” whatever “the cloud” happens to be. To allow the computers on each LAN to talk to each other, a specific route would have to be created on each LAN’s router. Each router has a LAN address known as E and a WAN address known as S . These are also known as private and public addresses, respectively. Let’s say that the subnet mask used on both LANs is 255.255.255.0, just like the CIDR setup we have been using. On router A, we would need the following syntax: Route add 10.253.253.0 mask 255.255.255.0 63.21.15.121 This makes the connection to the 10.253.253.0 network utilizing the LAN B router’s public address. This address is labeled as S , or the first serial connection, which is used to connect to different networks. On router B, we would need the following syntax: Route add 10.254.254.0 mask 255.255.255.0 63.21.15.128 This makes the connection to the 10.254.254.0 network utilizing the LAN A router’s public address. Once these two connections have been made, communications should be possible between the two LANs. If the routers are Windows Servers, some additional configuration would be necessary prior to adding these route line items. The servers would need to be equipped with two network adapters, making them multi-homed computers. Then, Routing and Remote Access would have to be configured to allow for IP forwarding. Alternate software such as ISA could also be used. After that, the route line items could be added. If you were using conventional black box routers or appliances, TCPIP protocols such as RIP and OSPF would be employed to streamline and automate the process: • Routing information protocol RIP is a distance vector protocol that uses algorithms to decipher which route to send data packets.