👤
Home Man
Search
Today's Posts
Register

RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Add two different subnet public IPs to single NIC or two different NIC on same box

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 06-05-2018
Add two different subnet public IPs to single NIC or two different NIC on same box

Hello Admins,

My ask is how can I add two different subnet IPs to same box with two different gateways?

The issue is I can connect to the box when I am on ethernet LAN, but I am not able to connect to the same IP when I am on wifi. The server is RHEL 7 VM on vmware.
How can I get connected to same IP when I am connected to wifi ?
# 2  
Old 06-06-2018
Can you explain what NICs you have, what is currently configured (i.e. the output from ip a s) and what you want to add and your attempts so far. There are various options to consider, so it woud be useful to understand your needs before just setting off, otherwise this is all a bit vague.


I'm sure we can help you through.


Kind regards,
Robin
# 3  
Old 06-06-2018
Quote:
[root@master ~]# ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.73.84 netmask 255.255.255.0 broadcast 192.168.73.255
inet6 fe80::20c:29ff:fe64:3347 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:64:33:47 txqueuelen 1000 (Ethernet)
RX packets 4729 bytes 5041878 (4.8 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 525 bytes 43841 (42.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.74.15 netmask 255.255.255.0 broadcast 192.168.74.255
inet6 fe80::20c:29ff:fe64:3351 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:64:33:51 txqueuelen 1000 (Ethernet)
RX packets 1000 bytes 87299 (85.2 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 9 bytes 618 (618.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The gateway is 192.168.73.1

My ask is I need both of these IPs reachable from outside.
Or
Either any one of these IP should be reachable from outside when I connected to wifi network as well as when connected to ethernet LAN network.
# 4  
Old 06-06-2018
I think that'll need routing, even just internally. Your clients won't know that an interface has two IP's, they'll still try to use the gateway instead of going direct.
# 5  
Old 06-06-2018
tried routing.. didnt work ..may be i put wrong configs.. i followed below with some changes in IPs/subnets:

How to connect two network interfaces on the same subnet? - Red Hat Customer Portal
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Solaris 2nd nic for different subnet ad101 Solaris 0 04-21-2014 09:50 AM
Solaris 11 2nd nic for different subnet ad101 Solaris 0 04-18-2014 05:37 PM
I want to tune NIC's rps, rfs and xps value. which NIC device should I modify. nnnnnnine Red Hat 0 12-03-2012 09:01 PM
squid proxy: one NIC for inbound & one NIC for outbound? aixlover IP Networking 4 04-12-2012 04:35 PM
x86 Solaris 10 nic driver added but not attached. NIC is not detected. vectrum Solaris 0 01-22-2012 01:08 PM
how can I determine which NIC card is virtual NIC Card alert0919 HP-UX 2 12-08-2008 05:26 AM
Sun box's NIC speed setting FredSmith Solaris 1 09-28-2006 08:44 AM
How to put 2 IPs on a single NIC Sergiu-IT IP Networking 1 04-05-2005 02:10 PM
not able to add nic in solaris 8 noripsni IP Networking 3 12-17-2001 09:16 AM


All times are GMT -4. The time now is 08:11 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password