Change private IP address without losing internet accessChange remote host IP address without losing control...
Can a 40amp breaker be used safely and without issue with a 40amp device on 6AWG wire?
Why is my Taiyaki (Cake that looks like a fish) too hard and dry?
Do Veracrypt encrypted volumes have any kind of brute force protection?
Fastest way from 10 to 1 with everyone in between
What are the advantages of using TLRs to rangefinders?
Why did the Death Eaters wait to reopen the Chamber of Secrets?
usage of mir gefallen
ISP is not hashing the password I log in with online. Should I take any action?
I sent an angry e-mail to my interviewers about a conflict at my home institution. Could this affect my application?
Short story about psychologist analyzing demon
Am I being scammed by a sugar daddy?
Dedicated bike GPS computer over smartphone
Nth term of Van Eck Sequence
The best in flight meal option for those suffering from reflux
I received a gift from my sister who just got back from
What game uses dice with compass point arrows, forbidden signs, explosions, arrows and targeting reticles?
Difference between grep -R and -r
What does this circuit symbol mean?
Would a character with eternal youth be AL-compliant?
Print the phrase "And she said, 'But that's his.'" using only the alphabet
Why is Skinner so awkward in Hot Fuzz?
Does "aurea" have the second meaning?
Should I worry about having my credit pulled multiple times while car shopping?
Why are backslashes included in this shell script?
Change private IP address without losing internet access
Change remote host IP address without losing control (Linux)Reach service on VM with private addressProgrammatically extract private IP address(es)How to display the IP address of the default Interface with Internet connection?How can I grant permission to a user to change the IP address?How to access server without IP-addresschange IP addressSSID of hostapd is not visibleDisable Internet Access on Eth0Slow internet connection after MAC address spoof
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I start with the following:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.0.161 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4957 (4.9 KB) TX bytes:8702 (8.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:204 errors:0 dropped:0 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15089 (15.0 KB) TX bytes:15089 (15.0 KB)
And I want to set my address to a specific value, so that I can identify it easily from other systems when SSHing. I run:
ifconfig ens33 192.168.10.2 netmask 255.255.255.0
route add default gw 192.168.10.1
And the result is:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20559 (20.5 KB) TX bytes:14302 (14.3 KB)
As a result, I'm losing internet connection, and the machine is also not discoverable within the network.
What am I doing wrong?
Update 1
Per @Tomasz's suggestion, I changed the router's mask to 255.255.0.0. I am now running:
ifconfig ens33 192.168.10.2 netmask 255.255.0.0 up
route add default gw 192.168.10.1 ens33
Unfortunately, same effect.
ubuntu ip network-interface vmware ifconfig
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
|
show 2 more comments
I start with the following:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.0.161 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4957 (4.9 KB) TX bytes:8702 (8.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:204 errors:0 dropped:0 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15089 (15.0 KB) TX bytes:15089 (15.0 KB)
And I want to set my address to a specific value, so that I can identify it easily from other systems when SSHing. I run:
ifconfig ens33 192.168.10.2 netmask 255.255.255.0
route add default gw 192.168.10.1
And the result is:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20559 (20.5 KB) TX bytes:14302 (14.3 KB)
As a result, I'm losing internet connection, and the machine is also not discoverable within the network.
What am I doing wrong?
Update 1
Per @Tomasz's suggestion, I changed the router's mask to 255.255.0.0. I am now running:
ifconfig ens33 192.168.10.2 netmask 255.255.0.0 up
route add default gw 192.168.10.1 ens33
Unfortunately, same effect.
ubuntu ip network-interface vmware ifconfig
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
And I guess you should addupat the end of theifconfigline.
– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago
|
show 2 more comments
I start with the following:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.0.161 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4957 (4.9 KB) TX bytes:8702 (8.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:204 errors:0 dropped:0 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15089 (15.0 KB) TX bytes:15089 (15.0 KB)
And I want to set my address to a specific value, so that I can identify it easily from other systems when SSHing. I run:
ifconfig ens33 192.168.10.2 netmask 255.255.255.0
route add default gw 192.168.10.1
And the result is:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20559 (20.5 KB) TX bytes:14302 (14.3 KB)
As a result, I'm losing internet connection, and the machine is also not discoverable within the network.
What am I doing wrong?
Update 1
Per @Tomasz's suggestion, I changed the router's mask to 255.255.0.0. I am now running:
ifconfig ens33 192.168.10.2 netmask 255.255.0.0 up
route add default gw 192.168.10.1 ens33
Unfortunately, same effect.
ubuntu ip network-interface vmware ifconfig
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I start with the following:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.0.161 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4957 (4.9 KB) TX bytes:8702 (8.7 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:204 errors:0 dropped:0 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15089 (15.0 KB) TX bytes:15089 (15.0 KB)
And I want to set my address to a specific value, so that I can identify it easily from other systems when SSHing. I run:
ifconfig ens33 192.168.10.2 netmask 255.255.255.0
route add default gw 192.168.10.1
And the result is:
ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::dfa6:820:b035:a36a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20559 (20.5 KB) TX bytes:14302 (14.3 KB)
As a result, I'm losing internet connection, and the machine is also not discoverable within the network.
What am I doing wrong?
Update 1
Per @Tomasz's suggestion, I changed the router's mask to 255.255.0.0. I am now running:
ifconfig ens33 192.168.10.2 netmask 255.255.0.0 up
route add default gw 192.168.10.1 ens33
Unfortunately, same effect.
ubuntu ip network-interface vmware ifconfig
ubuntu ip network-interface vmware ifconfig
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
Alexander George
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
Alexander GeorgeAlexander George
1062
1062
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Alexander George is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
And I guess you should addupat the end of theifconfigline.
– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago
|
show 2 more comments
And I guess you should addupat the end of theifconfigline.
– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago
And I guess you should add
up at the end of the ifconfig line.– Tomasz
1 hour ago
And I guess you should add
up at the end of the ifconfig line.– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago
|
show 2 more comments
1 Answer
1
active
oldest
votes
Assuming you are allowed to assign yourself an IP, and I don't know if you've been doing this correctly, your netmask:
Mask:255.255.255.0
In combination with your working IP:
192.168.0.161
Leaves you with this subnet: 192.168.0.0/24, which means you in no way could assign yourself any IP starting 192.168.10.. You could only change the last number in 192.168.0.161.
Fair point. I just updated my router's mask to255.255.0.0and I'm still having the same problem. I also added theupat the end of the command.
– Alexander George
1 hour ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Alexander George is a new contributor. Be nice, and check out our Code of Conduct.
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%2funix.stackexchange.com%2fquestions%2f524560%2fchange-private-ip-address-without-losing-internet-access%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Assuming you are allowed to assign yourself an IP, and I don't know if you've been doing this correctly, your netmask:
Mask:255.255.255.0
In combination with your working IP:
192.168.0.161
Leaves you with this subnet: 192.168.0.0/24, which means you in no way could assign yourself any IP starting 192.168.10.. You could only change the last number in 192.168.0.161.
Fair point. I just updated my router's mask to255.255.0.0and I'm still having the same problem. I also added theupat the end of the command.
– Alexander George
1 hour ago
add a comment |
Assuming you are allowed to assign yourself an IP, and I don't know if you've been doing this correctly, your netmask:
Mask:255.255.255.0
In combination with your working IP:
192.168.0.161
Leaves you with this subnet: 192.168.0.0/24, which means you in no way could assign yourself any IP starting 192.168.10.. You could only change the last number in 192.168.0.161.
Fair point. I just updated my router's mask to255.255.0.0and I'm still having the same problem. I also added theupat the end of the command.
– Alexander George
1 hour ago
add a comment |
Assuming you are allowed to assign yourself an IP, and I don't know if you've been doing this correctly, your netmask:
Mask:255.255.255.0
In combination with your working IP:
192.168.0.161
Leaves you with this subnet: 192.168.0.0/24, which means you in no way could assign yourself any IP starting 192.168.10.. You could only change the last number in 192.168.0.161.
Assuming you are allowed to assign yourself an IP, and I don't know if you've been doing this correctly, your netmask:
Mask:255.255.255.0
In combination with your working IP:
192.168.0.161
Leaves you with this subnet: 192.168.0.0/24, which means you in no way could assign yourself any IP starting 192.168.10.. You could only change the last number in 192.168.0.161.
answered 1 hour ago
TomaszTomasz
10.7k73473
10.7k73473
Fair point. I just updated my router's mask to255.255.0.0and I'm still having the same problem. I also added theupat the end of the command.
– Alexander George
1 hour ago
add a comment |
Fair point. I just updated my router's mask to255.255.0.0and I'm still having the same problem. I also added theupat the end of the command.
– Alexander George
1 hour ago
Fair point. I just updated my router's mask to
255.255.0.0 and I'm still having the same problem. I also added the up at the end of the command.– Alexander George
1 hour ago
Fair point. I just updated my router's mask to
255.255.0.0 and I'm still having the same problem. I also added the up at the end of the command.– Alexander George
1 hour ago
add a comment |
Alexander George is a new contributor. Be nice, and check out our Code of Conduct.
Alexander George is a new contributor. Be nice, and check out our Code of Conduct.
Alexander George is a new contributor. Be nice, and check out our Code of Conduct.
Alexander George is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2funix.stackexchange.com%2fquestions%2f524560%2fchange-private-ip-address-without-losing-internet-access%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
And I guess you should add
upat the end of theifconfigline.– Tomasz
1 hour ago
What OS is that? Are you using the NetworkManager?
– Tomasz
1 hour ago
It's Ubuntu running in VMWare. These are the default values.
– Alexander George
1 hour ago
That's a strange IP for a VM. Is the connection bridged? What IP do you have on the host machine (the "outer" OS)?
– Tomasz
1 hour ago
Yes, it's bridged. I wanted it to be independent of the host OS.
– Alexander George
1 hour ago