Loading ...
Sorry, an error occurred while loading the content.
 

Re: [linux] How to change the ip address

Expand Messages
  • Abdullah Al Mamun/Topon
    Please type # man ifconfig ... From: Kurian Polachan Date: 03/01/08 20:57:09 To: linux@yahoogroups.com Subject: [linux] How to change the ip address hi, please
    Message 1 of 23 , Mar 1, 2008
      Please type # man ifconfig

      -------Original Message-------

      From: Kurian Polachan
      Date: 03/01/08 20:57:09
      To: linux@yahoogroups.com
      Subject: [linux] How to change the ip address

      hi,
      please do answer my doubts

      1. I have a linux machine ....i need to know how to change the ip
      address and subnet mask through the command line...????
      2. I also need to how to configure the ethernet interface for dhcp???

      --
      Kurian Polachan
      Electronics and Communication Engineering (E8B)
      Govt. Model Engineering College
      Cochin
      mob: +919447045943




      [Non-text portions of this message have been removed]
    • Mario Chamorro
      I d like to take a stab at this - in addition to checking the various man pages that people have mentioned, you can learn to setup networking by reading , as I
      Message 2 of 23 , Mar 4, 2008
        I'd like to take a stab at this - in addition to checking the various
        man pages that people have mentioned, you can learn to setup
        networking by reading , as I did, the network startup script:

        /etc/rc.d/init.d/network

        In it you'll find that networking depends on 5 files, at least on
        RedHat flavored distros. The files are:

        /etc/hosts
        /etc/resolv.conf
        /etc/nssswitch
        /etc/sysconfig/network
        /etc/sysconfig/network-scripts/ifcfg-eth0 ( or whatever interface ).

        The hostname needs to be set in the first and fourth files, and the IP
        address, gateway, and netmask need to be setup in the last one.
        There's some other parameters which should be easy to figure out. Once
        you make backups of those files, and modify them, you can run:

        /sbin/service network restart

        and your new IP will be setup and ready to go. IP aliases can be setup
        using new files named 'ifcfg-eth0:0' 'ifcfg-eth0:1' etc.

        I hope that resolves your issue. -- Mario

        --- In linux@yahoogroups.com, Scott <scottro@...> wrote:
        >
        > On Mon, Mar 03, 2008 at 07:59:44PM +0000, ed wrote:
        > > Scott wrote:
        > > >
        > > >
        > > > On Sun, Mar 02, 2008 at 10:26:32PM +0000, ed wrote:
        > > >> Scott wrote:
        > > >> >
        > > >> >
        > > >> The man page is fine. If you think there's something to
        contribute to it
        > > >> then rather than change the FAQ, why not be a maintainer for the
        > > >> ifconfig (nettools?) gnu project, and add something to the ifconfig
        > > >> output that suggests using man ifconfig or info ifconfig (if
        the man
        > > >> page exists in the manpath).
        > > >
        > > > I'm sorry Ed, I respectfully disagree. Compare it to the OpenBSD
        page.
        > > > Look at the Linux ifconfig man page and tell me, only from that
        page,
        > > > how I create an alias on an interface.
        > >
        > > I dunno about that. Just do a /alias and it will jump to a paragraph
        > > relating to aliases, under the heading interfaces.
        >
        > All I see (on a Fedora 8 workstation here) is that there are no explicit
        > interface statistics for alias interfaces anymore. It doesn't give me
        > the syntax.
        >
        >
        > >
        > > What this does remind me of is that awkward functionality of ifconfig
        > > under BSD, where to list interfaces one has to add -a, that was just
        > > plain painful.
        >
        > Hrrm, not on my FreeBSD machine--I don't have an Open running these
        > days.
        >
        > >
        > > > after that, well, it's your fault. Most Linux manpages are buggy
        > > > software.
        > >
        > > Yeah I'm part programmer. Now working in a UNIX ops team managing the
        > > servers for BBC and a few other sites.
        >
        > >
        >
        > That sounds impressive--wow time flies, I think you were 16 once. Erm,
        > Ok, I realize I could have phrased that more clearly, I mean I was 16
        > once.
        >
        >
        > >
        > > Generally I think that the vast majority of people don't read the man
        > > pages anyway so perhaps if people begin to read them then the world
        > > would be a wonderful place. The first point of call for problems
        is what
        > > we get on stderr.
        > >
        >
        > I remember on one irc channel or another, late at night, we were
        > discussing how to add porn to man pages so that they'd be read. Sigh,
        > we should have put it on bash.org, there was something funny about gzip
        > and gunzip.
        >
        >
        >
        > > When fat fingering something to ifconfig often ifconfig --help is the
        > > direction that suggested, but I think this is what should be refined,
        > > not the man pages so much. Perhaps the most common thing ifconfig is
        > > used for is setting an IP address, there's no obvious means to do
        this here.
        > >
        > Agreed.
        >
        >
        > > Some might argue this is adequate, but I'd disagree
        > >
        > > ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]
        > >
        >
        > It's difficult for us to truly understand how it might seem to a
        > newcomer. I think I could make sense of that-- though I wouldn't be
        > able to say what each optiondid, but the newcomer is completely lost--I
        > do remember that I was.
        >
        > (Have to run back to work, will try to write more later.)
        >
        >
        > --
        > Scott Robbins
        > PGP keyID EB3467D6
        > ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
        > gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
        >
        > Giles: I need you to take Spike for a few days.
        > Xander: What?
        > Spike: What?
        > Anya: What?
        > Spike: I'm not stayin' with him.
        > Giles: I have a friend who's coming to town, and I'd like us to
        > be alone.
        > Anya: Oh, you mean an orgasm friend?
        > Giles: Yes, that's exactly the most appalling thing you could
        > have said.
        >
      • Kurian Polachan
        sure i was able to connect to the net just by using the commands ifconfig eth0 down ifconfig eth0 netmask up default route rw and
        Message 3 of 23 , Mar 5, 2008
          sure i was able to connect to the net

          just by using the commands

          ifconfig eth0 down
          ifconfig eth0 <ip> netmask <subnetmask> up
          default route rw <gateway>

          and by adding the domain name and nameserver in the /etc/resolv.conf
          file......

          thanks to all who replied to my mail.

          regards,


          On 04/03/2008, Mario Chamorro <mario@...> wrote:
          >
          > I'd like to take a stab at this - in addition to checking the various
          > man pages that people have mentioned, you can learn to setup
          > networking by reading , as I did, the network startup script:
          >
          > /etc/rc.d/init.d/network
          >
          > In it you'll find that networking depends on 5 files, at least on
          > RedHat flavored distros. The files are:
          >
          > /etc/hosts
          > /etc/resolv.conf
          > /etc/nssswitch
          > /etc/sysconfig/network
          > /etc/sysconfig/network-scripts/ifcfg-eth0 ( or whatever interface ).
          >
          > The hostname needs to be set in the first and fourth files, and the IP
          > address, gateway, and netmask need to be setup in the last one.
          > There's some other parameters which should be easy to figure out. Once
          > you make backups of those files, and modify them, you can run:
          >
          > /sbin/service network restart
          >
          > and your new IP will be setup and ready to go. IP aliases can be setup
          > using new files named 'ifcfg-eth0:0' 'ifcfg-eth0:1' etc.
          >
          > I hope that resolves your issue. -- Mario
          >
          >
          > --- In linux@yahoogroups.com <linux%40yahoogroups.com>, Scott
          > <scottro@...> wrote:
          > >
          > > On Mon, Mar 03, 2008 at 07:59:44PM +0000, ed wrote:
          > > > Scott wrote:
          > > > >
          > > > >
          > > > > On Sun, Mar 02, 2008 at 10:26:32PM +0000, ed wrote:
          > > > >> Scott wrote:
          > > > >> >
          > > > >> >
          > > > >> The man page is fine. If you think there's something to
          > contribute to it
          > > > >> then rather than change the FAQ, why not be a maintainer for the
          > > > >> ifconfig (nettools?) gnu project, and add something to the ifconfig
          > > > >> output that suggests using man ifconfig or info ifconfig (if
          > the man
          > > > >> page exists in the manpath).
          > > > >
          > > > > I'm sorry Ed, I respectfully disagree. Compare it to the OpenBSD
          > page.
          > > > > Look at the Linux ifconfig man page and tell me, only from that
          > page,
          > > > > how I create an alias on an interface.
          > > >
          > > > I dunno about that. Just do a /alias and it will jump to a paragraph
          > > > relating to aliases, under the heading interfaces.
          > >
          > > All I see (on a Fedora 8 workstation here) is that there are no explicit
          > > interface statistics for alias interfaces anymore. It doesn't give me
          > > the syntax.
          > >
          > >
          > > >
          > > > What this does remind me of is that awkward functionality of ifconfig
          > > > under BSD, where to list interfaces one has to add -a, that was just
          > > > plain painful.
          > >
          > > Hrrm, not on my FreeBSD machine--I don't have an Open running these
          > > days.
          > >
          > > >
          > > > > after that, well, it's your fault. Most Linux manpages are buggy
          > > > > software.
          > > >
          > > > Yeah I'm part programmer. Now working in a UNIX ops team managing the
          > > > servers for BBC and a few other sites.
          > >
          > > >
          > >
          > > That sounds impressive--wow time flies, I think you were 16 once. Erm,
          > > Ok, I realize I could have phrased that more clearly, I mean I was 16
          > > once.
          > >
          > >
          > > >
          > > > Generally I think that the vast majority of people don't read the man
          > > > pages anyway so perhaps if people begin to read them then the world
          > > > would be a wonderful place. The first point of call for problems
          > is what
          > > > we get on stderr.
          > > >
          > >
          > > I remember on one irc channel or another, late at night, we were
          > > discussing how to add porn to man pages so that they'd be read. Sigh,
          > > we should have put it on bash.org, there was something funny about gzip
          > > and gunzip.
          > >
          > >
          > >
          > > > When fat fingering something to ifconfig often ifconfig --help is the
          > > > direction that suggested, but I think this is what should be refined,
          > > > not the man pages so much. Perhaps the most common thing ifconfig is
          > > > used for is setting an IP address, there's no obvious means to do
          > this here.
          > > >
          > > Agreed.
          > >
          > >
          > > > Some might argue this is adequate, but I'd disagree
          > > >
          > > > ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]
          > > >
          > >
          > > It's difficult for us to truly understand how it might seem to a
          > > newcomer. I think I could make sense of that-- though I wouldn't be
          > > able to say what each optiondid, but the newcomer is completely lost--I
          > > do remember that I was.
          > >
          > > (Have to run back to work, will try to write more later.)
          > >
          > >
          > > --
          > > Scott Robbins
          > > PGP keyID EB3467D6
          > > ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
          > > gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
          > >
          > > Giles: I need you to take Spike for a few days.
          > > Xander: What?
          > > Spike: What?
          > > Anya: What?
          > > Spike: I'm not stayin' with him.
          > > Giles: I have a friend who's coming to town, and I'd like us to
          > > be alone.
          > > Anya: Oh, you mean an orgasm friend?
          > > Giles: Yes, that's exactly the most appalling thing you could
          > > have said.
          > >
          >
          >
          >


          [Non-text portions of this message have been removed]
        • thad
          ... Look at man pages of AIX, Tru64 and Solaris you can never go wrong. I have a veteran UNIX colleague who said the learning curve of Linux is much harder
          Message 4 of 23 , Mar 15, 2008
            > However, on OpenBSD, they have this amazing section. It's called.....
            >
            > EXAMPLES
            >
            > And I don't think that anyone's ever accused Theo of dumbing it down for
            > the masses. :)

            Look at man pages of AIX, Tru64 and Solaris you can never go wrong. I
            have a veteran UNIX colleague who said the learning curve of Linux is
            much harder than UNIX and he hated Linux man pages!

            I guess he is right so Linux users are more geek :)

            No flame, this is a Linux mailing list :D




            --
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            sometimes truth is stranger than fiction
            -bad religion-
            http://www.bloglines.com/blog/mailist
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            I don't think the computers will take over the world. I have a bucket of water.
          • ed
            ... This isn t true! Linux is easier, take a look at the process involved in installing from source. Solaris: gunzip something_thats_not_a_decade_old.tar.gz -
            Message 5 of 23 , Mar 15, 2008
              thad wrote:
              >
              > > However, on OpenBSD, they have this amazing section. It's called.....
              > >
              > > EXAMPLES
              > >
              > > And I don't think that anyone's ever accused Theo of dumbing it down for
              > > the masses. :)
              >
              > Look at man pages of AIX, Tru64 and Solaris you can never go wrong. I
              > have a veteran UNIX colleague who said the learning curve of Linux is
              > much harder than UNIX and he hated Linux man pages!
              >
              > I guess he is right so Linux users are more geek :)
              >
              > No flame, this is a Linux mailing list :D

              This isn't true!

              Linux is easier, take a look at the process involved in installing from
              source.

              Solaris:

              gunzip something_thats_not_a_decade_old.tar.gz - | tar xvf -

              To me it's just confusing why tar doesn't include a gzip stage on
              slowaris, there's gotta be more linux installs worldwide now than
              traditional UNIX, so it's about time traditional UNIX came out of the
              dark ages and update their user space tools.

              Yeah ZFS is great, but I'd bet anyone who's into storage is into backup,
              and backup usually involves a bit of tar.

              AIX isn't much better, and their docs are ambiguous to hell, look at the
              auditbin tools, it's not clear, from sentence structure if audit start
              will begin a configuration process... At least to me anyway.

              --
              The 5 1/4 Floppy Drive to Alderan is wigging because of Bernard Shifman
              threatening to sue.
              Verio is too high to give a damn.
              :: http://www.s5h.net/ :: http://www.s5h.net/gpg.html



              [Non-text portions of this message have been removed]
            • Scott
              ... I always troll about the Linux docs. Ever since my job change subjected me to them again. :) However, at least these days, most distros have their own
              Message 6 of 23 , Mar 15, 2008
                On Sat, Mar 15, 2008 at 05:30:04PM -0500, thad wrote:
                > > However, on OpenBSD, they have this amazing section. It's called.....
                > >
                > > EXAMPLES
                > >
                > > And I don't think that anyone's ever accused Theo of dumbing it down for
                > > the masses. :)
                >
                > Look at man pages of AIX, Tru64 and Solaris you can never go wrong. I
                > have a veteran UNIX colleague who said the learning curve of Linux is
                > much harder than UNIX and he hated Linux man pages!

                >
                > I guess he is right so Linux users are more geek :)



                >
                > No flame, this is a Linux mailing list :D

                I always troll about the Linux docs. Ever since my job change subjected
                me to them again. :)

                However, at least these days, most distros have their own wikis, which
                usually have great docs. Arch and CentOS spring to mind.


                --
                Scott Robbins
                PGP keyID EB3467D6
                ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
                gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

                Joyce: You belong in a good old fashioned college with keg
                parties and boys. Not here with Hellmouths and vampires.
                Buffy: Not really seeing the distinction.
              • Scott
                ... We re just talking about man pages here. :) ... Really? I found the AIX docs pretty good. Of course, it s not really fair to compare because by then, I
                Message 7 of 23 , Mar 15, 2008
                  On Sat, Mar 15, 2008 at 10:50:29PM +0000, ed wrote:
                  > thad wrote:
                  > >
                  > > > However, on OpenBSD, they have this amazing section. It's called.....
                  > > >
                  > > > EXAMPLES
                  > > >
                  > > > And I don't think that anyone's ever accused Theo of dumbing it down for
                  > > > the masses. :)
                  > >
                  > > Look at man pages of AIX, Tru64 and Solaris you can never go wrong. I
                  > > have a veteran UNIX colleague who said the learning curve of Linux is
                  > > much harder than UNIX and he hated Linux man pages!
                  > >
                  > > I guess he is right so Linux users are more geek :)
                  > >
                  > > No flame, this is a Linux mailing list :D
                  >
                  > This isn't true!

                  We're just talking about man pages here. :)

                  >
                  >
                  > AIX isn't much better, and their docs are ambiguous to hell, look at the
                  > auditbin tools, it's not clear, from sentence structure if audit start
                  > will begin a configuration process... At least to me anyway.

                  Really? I found the AIX docs pretty good. Of course, it's not really
                  fair to compare because by then, I had a lot more experience. Even the
                  Linux man pages are usually understandable, it's just that they tend to
                  have large omissions.

                  Also, I didn't do very much on AIX, it was mostly a matter of seeing
                  what their ps flags did, etc.


                  --
                  Scott Robbins
                  PGP keyID EB3467D6
                  ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
                  gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

                  Buffy: The world is what it is---we fight, we die. Wishing
                  doesn't change that.
                  Giles: I have to believe in a better world.
                  Buffy: Go ahead. I have to live in this one.
                Your message has been successfully submitted and would be delivered to recipients shortly.
                »
                «