Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I messed up my Networking. Please Help.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Sun Jun 10, 2018 2:20 pm    Post subject: I messed up my Networking. Please Help. Reply with quote

Hey. So, I'm installing Gentoo (obviously), and I used
Code:
ifconfig
to get my IP to SSH in. However, the info it gives is messed up.
Code:

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::a00:27ff:fee0:8348  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:e0:83:48  txqueuelen 1000  (Ethernet)
        RX packets 12836  bytes 15545958 (14.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3547  bytes 216988 (211.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 16  bytes 960 (960.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 960 (960.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



How can I fix this? Those IP addresses are not what they should be.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Sun Jun 10, 2018 2:56 pm    Post subject: Reply with quote

It's kind of hard for us to tell what it should be... looks "fine" to me. Other than it not working, why do you think it's wrong?

How were you intending it to be configured? Were you using DHCP?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Sun Jun 10, 2018 3:02 pm    Post subject: Reply with quote

I think I'm using DHCP. The issue is that the addresses look wrong to me. In the past, on each and every PC I have ever used on my network, the address has always been 192.168.1.(something).

Also I can't use PuTTY to SSH in.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Sun Jun 10, 2018 3:12 pm    Post subject: Reply with quote

You set this up at another location, didn't you, one that used a different IP scheme from 192.168.x.x?

When you did that, did you do the manual networking section of the handbook? If so, the fastest way will probably be for you to go back and just redo that section all over again.

I amt setting my laptop up via DHCP (with a static IP assigned at the router), so every time I boot with the boot media to work on it it gets the same IP address. But that is not necessary, as using
Code:
ip addr
will tell you whatever IP DHCP assigns to your machine, once you get your machine to start using DHCP instead of hte hardcoded IP address.

From the handbook page for installing (this is AMD64, but likely almost identical for other arches) you might give this a shot to at least get the interface running on DHCP:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking#Using_DHCP
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Sun Jun 10, 2018 3:13 pm    Post subject: Reply with quote

How many ethernet cards do you have, and how are they hooked up?

Did you hardcode 10.0.2.15 somewhere?

Are you using openrc - and if so, how did you write your /etc/conf.d/net ?

-----------------

You know, this finally starts to make sense. After serendipitously finding your other post, now it's clear that you're running a VM which would make a very large impact on our responses.

Normally when you use DHCP, you get your main DHCP address.

However now you mention VM. There are modes on your VM host that can fake yet another IP address which you can get on your VM, and this is the IP address you're getting. So now you're getting NAT into NAT. That's why you're getting 10.0.2.15.

You'll need to make a bridge on your host or use macvtap or something like that to share your ip address space as your host. I don't know what VM host you're using, and unfortunately that may likely need to be modified to do what you want.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
StevenC21
n00b
n00b


Joined: 07 Jun 2018
Posts: 63

PostPosted: Sun Jun 10, 2018 4:35 pm    Post subject: Reply with quote

I am using Oracle VirtualBox. Can you assist me with fixing the internet, please? I'm afraid what you are recommending is going over my level of understanding.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sun Jun 10, 2018 5:36 pm    Post subject: Reply with quote

StevenC21,

dhcp servers can be set up in many ways. They are all equally valid.

Code:
inet 10.0.2.15
looks like VBox host only networking. Which is probably not want you want, since it can only reach the VBox host.
You almost certainly want the VM to reach the internet.

Shut down the VM. Go into the Virtualbox Machine control panel.
Click on the word Network.
In the Adaptor 1 tab, where it says Attached to NAT, choose Bridged Adaptor in the dropdown.

In the name dropdown, choose your real network interface, if its not populated automatically.

-- edit --

To be clear, this is the Virtualbox guest network, not your Virtualbox host.
I spotted that as I've just spent a few hours fixing a Windows guest that always used to JustWork.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Sun Jun 10, 2018 11:05 pm    Post subject: Reply with quote

How well integrated VB is with host networking? As I do not use VB I'm not much help here.

I've had to jump through hoops for QEMU for my host to be able to share the network with VMs running on the host along with the rest of the network. The bridge configuration required the host to be specially configured, though it may be an artifact of running Linux on Linux; VB might be able to configure the bridge behind the scenes on Windows.

Yeah it appears you have jumped into the deep end, though everyone starts somewhere. Sometimes running on bare metal is easier for learning, I've always hated simulation/emulation for learning, even if I screw up the install on the real machine...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum