# Adding new network int and listening on it.



## blind0ne (Oct 25, 2021)

Hello, I attached new nic to the motherboard, it's even in my ifconfig output, but the switch port is not going up. What should I do on FreeBSD host in order to activate new nic? Here Is the output of ifconfig.

```
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
        ether 78:ac:c0:98:00:d4
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
dc0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80008<VLAN_MTU,LINKSTATE>
        ether 00:80:ad:3c:3f:0a
        media: Ethernet autoselect
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```
where bge0 is my currently used int and dc0 is new one, but maintaining tcpdump -i dc0 gives no output as far as swithport not going up even after no shutdown command on switchport. 

Do I need to change the nic?


----------



## SirDice (Oct 25, 2021)

```
status: no carrier
```
Bad cable? Switch port administratively down?


----------



## blind0ne (Oct 25, 2021)

SirDice said:


> ```
> status: no carrier
> ```
> Bad cable? Switch port administratively down?


cabble is fine, changed it already, switchport is active.


----------



## SirDice (Oct 25, 2021)

Then the card itself might be dodgy (or the switch port). If there's no carrier it means it doesn't detect a signal, without that carrier the connection simply won't work.


----------



## blind0ne (Oct 25, 2021)

SirDice said:


> Then the card itself might be dodgy. If there's no carrier it means it doesn't detect a signal, without that carrier the connection simply won't work.


Thanks, i'll try to change card itself


----------



## blind0ne (Oct 25, 2021)

ok, looks like it help, but still can't see traffic.

```
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vr0, link-type EN10MB (Ethernet), capture size 262144 bytes
```
And there is some movement in dump of interface of switch. But nothing on tcpdump. What it could be?

Is this bad too?

```
vr0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=82808<VLAN_MTU,WOL_UCAST,WOL_MAGIC,LINKSTATE>
        ether 00:13:46:64:3d:ba
        media: Ethernet autoselect
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


----------



## SirDice (Oct 25, 2021)

The card is down, `ifconfig vr0 up`.


----------



## blind0ne (Oct 25, 2021)

SirDice said:


> The card is down, `ifconfig vr0 up`.


You saved me, you are the best) Now everything works


----------



## SirDice (Oct 25, 2021)

Cards can have two states, physically down (in other words, not connected) or administratively down. The first is the `status` you see in the ifconfig(8) output, the second is the presence or absence of `UP` in the flags. A card that's down will not send or receive anything.


----------



## covacat (Oct 25, 2021)

some cards have crappy auto-negotiation but sometimes they work when you force mediatype and mediaopt (ifconfig)
also older cards don't have auto-x so you need a "flat" cable to connect to a switch or a crossover cable to connect to another computer


----------

