[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setting gateway IP from command line



Check out route.  The command should be something like "route add default gw IPaddressofgateway" (this is off the top of my head, so might not be 100% correct)

You can see the current route by "route" or "route -n" to see it without the machine names resolved.  Once you have that, edit /etc/network/interfaces to something like this:
iface eth0 inet static
        address XXX.XXX.XXX.XXX
        netmask 255.255.255.0
        network XXX.XXX.XXX.XXX
        broadcast XXX.XXX.XXX.255
        gateway XXX.XXX.XXX.XXX

...and then do "ifdown -a ; ifup -a" to restart the interfaces.


abramo@speakeasy.net wrote:

> I'm sure this is a very basic question but I have zero experience with debian.  I work at a computer shop and we installed debian on a pair of new machines for a customer.  He needs to assign an IP and gateway to one of them and could not figure out how to do it so he brought the machines back to us and begged.  We are basically a windows only house.  I'm the only linux user and all of my experience is with mandrake and slackware.  I've always used X in both and there is no X on this machine.
>
> I just need the command name and I can do it from there.
>
> Thanks all!
>
> Abe
> Jesus saves,
> Allah forgives,
> Chuthulu thinks you'd make a nice sandwich.
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

--
"I was on a Boston to New York shuttle flight that gets stuck on the runway for 3 hours
with no explanation. Worse, I'm sitting in front of three idiot consultants from Razorfish
who spend the whole time talking loudly and incessantly. Remarkably, not one word of it
resembled any productive activity in the slightest. 'So, I conducted a series of group
discussion sessions to quantify how they establish their procedures.' 'But, Bianca, how
did you formulate the framework for evaluating their paradigms?'
        My favorite line - Bianca is irate because a client asked her for some concrete
bit of information: 'Can you believe that? Hello? I'm an Information Architect, not a
Knowledge Engineer!'" --dump() on slashdot





Reply to: