http://wiki.mikrotik.com/wiki/Simple_Static_Routes_Example
1)
Download following images
a)
linux-microcore-4.0.2-clean
http://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/linux-microcore-4.0.2-clean.img/download
username: tc
password: no password
b)
routeros-6.15
http://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/routeros-6.15-qemu.zip/download
username: admin
password: no password
2)
Upload images
a)
Open "gns3 0.8.3", select "Edit" --> "Preferences" --> "Qemu" --> "Qemu Guest".
* Enter "Identifier name"
* Browse "Binary Image" we downloaded, linux-microcore-4.0.2-clean.img and routeros-6.15.img
* Save
3)
Try Simple Static Routes Example
####Host-1 : Set IP Address####
* Set IP address for interface eth0
$sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
####Host-2 : Set IP Address####
* Set IP address for interface eth0
$sudo ifconfig eth0 10.10.1.2 netmask 255.255.255.0 up
####Router-1 : Set IP Address####
* List all interfaces
>interface print
* List all routes
>ip route print
* Set IP address for interface "ether1"
>ip address add address=192.168.1.180/24 interface=ether1
* List all routes
>ip route print
* Set IP address for interface "ether2"
>ip address add address=10.10.1.180/24 interface=ether2
* List all routes
>ip route print
* Try to ping to Host-1:192.168.1.2
>ping 192.168.1.2 - Works
* Try to ping to Host-2:10.10.1.2
>ping 10.10.1.2 - Works
####Host-1 : Test Ping####
* Try to ping to interface "ether1" of router
$ping 192.168.1.180 - Works
* Try to ping to interface "ether2" of router
$ping 10.10.1.180 - Network is unreachable
* Try to ping to Host-2:10.10.1.2
$ping 10.10.1.2 - Network is unreachable
####Host-2 : Test Ping####
* Try to ping to interface "ether2" of router
$ping 10.10.1.180 - Works
* Try to ping to interface ether1 of router
$ping 192.168.1.180 - Network is unreachable
* Try to ping to Host-1:192.168.1.2
$ping 192.168.1.2 - Network is unreachable
####Host-1 : Set Default Gateway####
* List all routes
$route -n
* Set default gateway of host-1(route/path to reach the default router, which route the packet to its destination)
$sudo route add default gw 192.168.1.180 eth0
* List all routes
$route -n
* Try to ping to interface "ether1" of router
$ping 192.168.1.180 - Works
* Try to ping to interface "ether2" of router
$ping 10.10.1.180 - Works
* Try to ping to Host-2:10.10.1.2
$ping 10.10.1.2 - No error and Reply message, that means Request packets are reached at destination (Host-2) and Reply packets are drop somewhere.
####Host-2 : Set Default Gateway####
* List all routes
$route -n
* Set default gateway of host-1 (route/path to reach the default router, which route the packet to its destination)
$sudo route add default gw 10.10.1.180 eth0
* List all routes
$route -n
####Host-1 : Test Ping####
* Try to ping to interface "ether1" of router
$ping 192.168.1.180 - Works
* Try to ping to interface "ether2" of router
$ping 10.10.1.180 - Works
* Try to ping to Host-2:10.10.1.2
$ping 10.10.1.2 - Works, now we get Replay packets from destination (Host-2), since we added default gateway in Host-2.
===================
* Remove a route
> ip address remove numbers=2
No comments:
Post a Comment