Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
Click Here to receive this Complete Guide absolutely free.
I need to configure an ethernet interface, say 'eth0', and give it an IP of 10.1.1.19 with netmask 255.255.255.0
I need to set the default gw as 192.168.0.1
Whenever I do this with the 'route add default gw 192.168.0.1' command, it fails with:
SIOCADDRT: network is unreachable
I guess it only accepts default gateways that are similar, i.e. 10.1.1.X
In Windows this is straight forward; I just simply use the LAN properties window and play around with the TCP/IP properties to manually set the IP and gateway to whatever values I please and this works smoothly. Here's the output from windows:
What you want is impossible !
With eth0 having 10.1.1.19 you can only acces a 10.1.1. network,
What you can do with routing is program the routing table for a certain network
route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.1.1.1 ( every address starting with 192.168.0 is send to router 10.1.1.1 )
route add default gw 10.1.1.254 the rest is send to 10.1.1.254
I don't think this is gonna work. I need the default route to be sent to the gateway 192.168.0.1
I can't believe how straight forward this is in Windows. Here's the output of the route table from the DOS prompt. Isn't there a way to replicate this table's characteristics with a few 'route add' commands in Linux?