Add Secondary IP Address That Is Seen By A Server
up vote
0
down vote
favorite
I need to add another IP address and I need the server to be able to know see it.
On the client: curl using the second IP/interface
On the server: netstat or tcpdump
I want to be able to see the second IP address in the server.
Tried ip link add, ip address add, ifconfig. Nothing works. On the server there is always the "main" address of the client.
Everything is on the LAN, no need for DNS, etc..
networking
add a comment |
up vote
0
down vote
favorite
I need to add another IP address and I need the server to be able to know see it.
On the client: curl using the second IP/interface
On the server: netstat or tcpdump
I want to be able to see the second IP address in the server.
Tried ip link add, ip address add, ifconfig. Nothing works. On the server there is always the "main" address of the client.
Everything is on the LAN, no need for DNS, etc..
networking
3
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to add another IP address and I need the server to be able to know see it.
On the client: curl using the second IP/interface
On the server: netstat or tcpdump
I want to be able to see the second IP address in the server.
Tried ip link add, ip address add, ifconfig. Nothing works. On the server there is always the "main" address of the client.
Everything is on the LAN, no need for DNS, etc..
networking
I need to add another IP address and I need the server to be able to know see it.
On the client: curl using the second IP/interface
On the server: netstat or tcpdump
I want to be able to see the second IP address in the server.
Tried ip link add, ip address add, ifconfig. Nothing works. On the server there is always the "main" address of the client.
Everything is on the LAN, no need for DNS, etc..
networking
networking
asked Nov 22 at 22:16
nmnir
1013
1013
3
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago
add a comment |
3
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago
3
3
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Try this solution as ip
isn't persistent:
sudo nmcli con modify "interface_name" +ipv4.addresses 172.16.2.140/24
sudo nmcli con up "interface_name"
Note you change that ip add I added to yours and do this on the client machine.
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try this solution as ip
isn't persistent:
sudo nmcli con modify "interface_name" +ipv4.addresses 172.16.2.140/24
sudo nmcli con up "interface_name"
Note you change that ip add I added to yours and do this on the client machine.
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
|
show 1 more comment
up vote
0
down vote
Try this solution as ip
isn't persistent:
sudo nmcli con modify "interface_name" +ipv4.addresses 172.16.2.140/24
sudo nmcli con up "interface_name"
Note you change that ip add I added to yours and do this on the client machine.
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
|
show 1 more comment
up vote
0
down vote
up vote
0
down vote
Try this solution as ip
isn't persistent:
sudo nmcli con modify "interface_name" +ipv4.addresses 172.16.2.140/24
sudo nmcli con up "interface_name"
Note you change that ip add I added to yours and do this on the client machine.
Try this solution as ip
isn't persistent:
sudo nmcli con modify "interface_name" +ipv4.addresses 172.16.2.140/24
sudo nmcli con up "interface_name"
Note you change that ip add I added to yours and do this on the client machine.
edited Nov 23 at 5:30
answered Nov 22 at 22:38
George Udosen
18.5k94265
18.5k94265
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
|
show 1 more comment
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
Thanks, but it's not working. I read about nmcli and also tried nmcli con add type ethernet con-name static2 ifname enp0s3 ip4 192.168.1.50/24 gw4 192.168.1.1 but the server see the main IP address
– nmnir
Nov 22 at 23:04
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
so if you ping that ip add what happens?
– George Udosen
Nov 22 at 23:17
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Pinging works. It also works with other methods. Thats because the icmp that asks "who has the_new_address".
– nmnir
Nov 22 at 23:19
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Did you restart the networkmanager on the server?
– George Udosen
Nov 22 at 23:33
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
Also try to ping the client from the server!
– George Udosen
Nov 22 at 23:45
|
show 1 more comment
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095229%2fadd-secondary-ip-address-that-is-seen-by-a-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Possible duplicate of How to set up multiple IP addresses?
– Tom Brossman
2 days ago