Published 6月 08, 2018 by with 0 comment

CCIE-RS Lab IOU Lession 4: About the NETMAP


NETMAP just like the .net file for Dynamips.
IOU uses NETMAP to bulid the network topology.

The http://evilrouters.net/ points out that by default, IOU will look for the NETMAP file in the three places.
1. A file named “NETMAP” in the current working directory.
2. A file named “.NETMAP” in the user's home directory.
3. The file pointed to by the NETIO_NETMAP environment variable.

In this lab, I will create a NETMAP file and build a network enviornment.

Step 1. Creating the directory for NETMAP file.


Step 2. Creating the NETMAP file in the /home/peter/iou/netmap/lab01/


My NETMAP file:
10:0/0 50:1/0
10:2/0 20:0/0
20:1/0 30:0:0
30:0/1 40:2/0
40:1/0 50:2/0

Step 3. Creating the IOU_Lession4.sh and then changing that permissions.


IOU_Lession4.sh:
#!/bin/bash
#
# Creating 5 routers:
# R10 (Port #2001): e0/0-3 e1/0-3 s2/0-3
# R20 (Port #2002): s0/0-3 s1/0-3
# R30 (Port #2003): s0/0-3
# R40 (Port #2004): e0/0-3 e1/0-3 s2/0-3
# R50 (Port #2005): e0/0-3 e1/0-3 e2/0-3
#
# History:
# 2011/02/14 by Happy Peter
# http://blog.xuite.net/juilin77/happy
#
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#
#NETMAP Environment Variable
export NETIO_NETMAP=/home/peter/iou/netmap/lab01/NETMAP
#R10
/home/peter/iou/wrapper-linux -m ~/iou/i86bi_linux-adventerprisek9-ms -p 2001 -- -e 2 -s 1 10 &
sleep 1s
#R20
/home/peter/iou/wrapper-linux -m ~/iou/i86bi_linux-adventerprisek9-ms -p 2002 -- -e 0 -s 2 20 &
sleep 1s
#R30
/home/peter/iou/wrapper-linux -m ~/iou/i86bi_linux-adventerprisek9-ms -p 2003 -- -e 0 -s 1 30 &
sleep 1s
#R40
/home/peter/iou/wrapper-linux -m ~/iou/i86bi_linux-adventerprisek9-ms -p 2004 -- -e 2 -s 1 40 &
sleep 1s
#R50
/home/peter/iou/wrapper-linux -m ~/iou/i86bi_linux-adventerprisek9-ms -p 2005 -- -e 3 -s 0 50 &
sleep 1s
#
unset NETIO_NETMAP
#Checking
exit 0

Step 4. Running the Shell Script.


Step 5. Running the RIP and checking the routing.





Reference:
evilrouters.net http://evilrouters.net/
鳥哥的 Linux 私房菜 http://linux.vbird.org/
Thanks for "Le****e sir" (真。牛人)


最初發表 / 最後更新: 2011.02.14 / 2018.06.08

0 comments:

張貼留言