How to autmatically remove/add IP-adress at startup.

Home Page Forums Network Management ZeroShell How to autmatically remove/add IP-adress at startup.

This topic contains 1 reply, has 0 voices, and was last updated by  skypher 11 years, 6 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #40855

    skypher
    Member

    Hello.

    I have installed ZeroShell on an old computer and has 3 NICs in it. I want to use ZeroShell as a router at work, where I can’t use more than one IP-adress, and I haven’t got access to any switches or hubs.

    So my setup is like this:

    ETH00 = WAN connection (dynamic IP-adress)
    ETH01 = Computer 1
    ETH02 = Computer 2

    Now, I’ve created this as a sort of experiment to see how much I remember from school about routing and networking.

    I’ve managed to set everything up and working, but there’s 1 thing that’s left to do to make it maintenance free, and this is where my problem is.

    On the ZeroShell web configuration page, SETUP->NETWORK, under ETH00

    There is an entry with ip: 192.168.0.75 255.255.255.0
    As long as that line is there everything works as I want it to BUT, when I start the router, Internet doesn’t work on the client computers. I have to remove this IP and add it again and it works.

    What I want to know, is what I can put in the startup script to remove / add this automatically so I don’t have to do this every time someone starts the computer?

    I’ve tried to type something along the lines of:
    ifconfig ETH00:0 192.168.0.75 netmask 255.255.255.0
    -OR-
    route add 192.168.0.75

    But that doesn’t seem to work, or maybe I’m doing it wrong.

    //Skypher

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.