LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-18-2016, 02:49 PM   #1
Anony999
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Rep: Reputation: Disabled
Linux Network Help


Hi

I have two Centos7 vps's

One is set just fine - internet out on an IP and an internal IP for backup (10.0.0.9) to a local backup server

Here is the config listing

VPS1 Talking to internet and backup network

Code:
[root@server network-scripts]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3c:b8:ad:a2 brd ff:ff:ff:ff:ff:ff
    inet XX.XXX.192.10/27 brd XX.XX.192.31 scope global dynamic ens3
       valid_lft 21178735sec preferred_lft 21178735sec
    inet6 fe80::216:3cff:feb8:ada2/64 scope link 
       valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:18:3e:a5:ef:26 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.9/24 brd 10.0.0.255 scope global dynamic ens4
       valid_lft 21178735sec preferred_lft 21178735sec
    inet6 fe80::218:3eff:fea5:ef26/64 scope link 
       valid_lft forever preferred_lft forever
Code:
[root@server network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         XX.XXX.192.1    0.0.0.0         UG    101    0        0 ens3
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 ens4
XX.XX.68.6     XX.XXX.192.1    255.255.255.255 UGH   100    0        0 ens3
XX.XXX.192.0    0.0.0.0         255.255.255.224 U     100    0        0 ens3
10.0.0.x being the internal network to the backup server

My second VPS is this (with no 10.0.0.7 setup basically the ens4 line)

VPS2 Talking to Internet but not Internal Backup Network

Code:
[root@server network-scripts]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3c:e9:4b:31 brd ff:ff:ff:ff:ff:ff
    inet XX.XXX.192.19/27 brd XX.XXX.192.31 scope global dynamic ens3
       valid_lft 21333345sec preferred_lft 21333345sec
    inet6 fe80::216:3cff:fee9:4b31/64 scope link 
       valid_lft forever preferred_lft forever
Code:
[root@server network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         XX.XXX.192.1    0.0.0.0         UG    100    0        0 ens3
XX.XXX.68.6     XX.XXX.192.1    255.255.255.255 UGH   100    0        0 ens3
XX.XXX.192.0    0.0.0.0         255.255.255.224 U     100    0        0 ens3
Now how do i add the 10 address range to the second VPS (ens4) so its the same as the first VPS (well not quite the same as it has a different 10.0 IP address)

All help appreciated

Last edited by Anony999; 06-18-2016 at 03:10 PM.
 
Old 06-18-2016, 06:29 PM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 774

Rep: Reputation: 242Reputation: 242Reputation: 242
Maybe add a route? Or maybe you could set up a network bridge (ebtables)?
 
Old 06-19-2016, 01:47 AM   #3
Anony999
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
How would i add a route ?
 
Old 06-20-2016, 11:14 AM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
On the second server simple copy the ens3 config to ens4 and change the ip address information. Then ifup ens4.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] problem: Wind River Linux is not detecting the network cards (network interfaces) NM04 Linux - Newbie 17 12-06-2013 08:06 AM
Setting up test network to learn network management for linux and windows clients. newbeliever Linux - Networking 2 07-22-2013 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration