From 689e3a69aee472a96e5c60693b9554b52fcb2d90 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Thu, 13 Jul 2023 22:41:10 +0100 Subject: [PATCH] Added connection between Central-router and Internet via gateway IP --- Central-router.startup | 3 +++ Internet.startup | 4 ++++ lab.conf | 1 + 3 files changed, 8 insertions(+) diff --git a/Central-router.startup b/Central-router.startup index 5027664..a298bee 100755 --- a/Central-router.startup +++ b/Central-router.startup @@ -1,3 +1,6 @@ # IP of Central-router ip addr add 192.168.0.2/24 dev eth0 ip link set up dev eth0 + +# Gateway IP +ip route add default via 192.168.0.1 dev eth0 diff --git a/Internet.startup b/Internet.startup index 255934c..38145e1 100755 --- a/Internet.startup +++ b/Internet.startup @@ -1,3 +1,7 @@ # IP of Internet ip addr add 80.64.157.254/16 dev eth0 ip link set up dev eth0 + +# Gateway IP for Central-router +ip addr add 192.168.0.1/24 dev eth1 +ip link set up dev eth1 diff --git a/lab.conf b/lab.conf index 99d57c9..15962d8 100755 --- a/lab.conf +++ b/lab.conf @@ -1,3 +1,4 @@ Internet[0]=Internet +Internet[1]=Central-router Central-router[0]=Central-router