Quantcast
Channel: VIRL
Viewing all articles
Browse latest Browse all 1811

Assign server node IP address via ANK configuration file

$
0
0

@crosson wrote:

Did some forum searching and couldn't find the answer to this. In case anyone was wondering if you ever wanted your server nodes to have an assigned IP prior to launching a simulation then add these lines at the bottom of your ANK config.

runcmd:
- ip route del default
- sudo /sbin/dhclient eth1 -pf /var/run/dhclient.eth1.pid -lf /var/lib/dhclient/dhclient.eth1.lease

This deletes the nodes default route learned from the OOB allowing your node to learn an alternate default via your lab's DHCP server. This assumes you are running a dhcp server in your simulation. Or statically assign the ip like so.

runcmd:
- ifconfig eth1 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
- route add default gw 192.168.0.1

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1811

Latest Images

Trending Articles



Latest Images