Browse Source

changed default gateway ip and dns config

master
Sebastian Rieger 8 years ago
parent
commit
8c4fc4d46d
  1. 8
      GIT-VIRL-HS-Fulda/Advanced Computer Networks (Master AI)/advcompnet-lab3-sdn-lxc.virl

8
GIT-VIRL-HS-Fulda/Advanced Computer Networks (Master AI)/advcompnet-lab3-sdn-lxc.virl

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.9" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.9/virl.xsd">
<topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.95" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.95/virl.xsd">
<extensions>
<entry key="management_network" type="String">exclusive</entry>
</extensions>
@ -208,7 +208,10 @@ write_files:&#xD;
dhclient eth2&#xD;
# set default gateway to VIRL host in flat1 &#xD;
route del -net default&#xD;
route add -net default gw 172.16.1.254&#xD;
route add -net default gw 172.16.1.1&#xD;
# change dns&#xD;
echo "nameserver 8.8.8.8" &gt;/etc/resolv.conf&#xD;
echo "nameserver 8.8.4.4" &gt;&gt;/etc/resolv.conf&#xD;
# enable routing and NAT for 10.10.0.0/16&#xD;
sysctl -w net.ipv4.ip_forward=1&#xD;
iptables -A POSTROUTING -t nat -s 10.10.0.0/16 -o eth2 -j MASQUERADE&#xD;
@ -251,6 +254,7 @@ write_files:&#xD;
<interface id="0" name="eth1" ipv4="10.0.128.2" netPrefixLenV4="30"/>
<interface id="1" name="eth2"/>
</node>
<annotations/>
<connection dst="/virl:topology/virl:node[3]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[1]"/>
<connection dst="/virl:topology/virl:node[4]/virl:interface[1]" src="/virl:topology/virl:node[1]/virl:interface[2]"/>
<connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[5]/virl:interface[1]"/>

Loading…
Cancel
Save