Network drops eveytime I change my IP
Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?
networking ip
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?
networking ip
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?
networking ip
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Every time I change my IP with the command ifconfig wlp2s0 192.168.132.118 I lose internet connection and the only way to get it back is if I run sudo service network-manager restart but then the IP resets to the default. Is there a way to fix this ?
networking ip
networking ip
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited yesterday
vidarlo
8,91342442
8,91342442
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
Darren Mew
1
1
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Darren Mew is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You should know how a machine commonly (always) reaches the internet.
It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.
Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.
But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.
To set a route, use ip:
ip route add default via 192.168.132.1
This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.
But my real question is why you would want to change your IP. You probably don't.
In addition, you may have to set DNS servers to suitable values.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Darren Mew 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%2faskubuntu.com%2fquestions%2f1104498%2fnetwork-drops-eveytime-i-change-my-ip%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
You should know how a machine commonly (always) reaches the internet.
It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.
Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.
But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.
To set a route, use ip:
ip route add default via 192.168.132.1
This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.
But my real question is why you would want to change your IP. You probably don't.
In addition, you may have to set DNS servers to suitable values.
add a comment |
You should know how a machine commonly (always) reaches the internet.
It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.
Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.
But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.
To set a route, use ip:
ip route add default via 192.168.132.1
This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.
But my real question is why you would want to change your IP. You probably don't.
In addition, you may have to set DNS servers to suitable values.
add a comment |
You should know how a machine commonly (always) reaches the internet.
It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.
Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.
But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.
To set a route, use ip:
ip route add default via 192.168.132.1
This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.
But my real question is why you would want to change your IP. You probably don't.
In addition, you may have to set DNS servers to suitable values.
You should know how a machine commonly (always) reaches the internet.
It has a local IP, typically in one of the RFC 1918-addresses, like 192.168.132.118 is an example of.
Commonly home networks employ the subnet mask of 255.255.255.0 (or in CIDR-notation: /24). This means that everything from 192.168.132.1 to 192.168.132.254 is assumed reachable on the local network.
But to reach something outside the local network, you have to go via a router, that forwards packets for you. This is commonly called a gateway. The gateway has one IP in your local subnet (e.g. directly reachable), and one address in another network, and a routing table specifying how to reach other hosts.
To set a route, use ip:
ip route add default via 192.168.132.1
This of course assumes that your router is reachable at 192.168.132.1. Your router has to be in the same subnet as you set your IP to.
But my real question is why you would want to change your IP. You probably don't.
In addition, you may have to set DNS servers to suitable values.
answered yesterday
vidarlo
8,91342442
8,91342442
add a comment |
add a comment |
Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.
Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.
Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.
Darren Mew is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2faskubuntu.com%2fquestions%2f1104498%2fnetwork-drops-eveytime-i-change-my-ip%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